Skip to content
Commit 12463779 authored by Craig Topper's avatar Craig Topper
Browse files

[SimplifyCFG] When merging conditional stores, don't count the store we're...

[SimplifyCFG] When merging conditional stores, don't count the store we're merging against the PHINodeFoldingThreshold

Merging conditional stores tries to check to see if the code is if convertible after the store is moved. But the store hasn't been moved yet so its being counted against the threshold.

The patch adds 1 to the threshold comparison to make sure we don't count the store. I've adjusted a test to use a lower threshold to ensure we still do that conversion with the lower threshold.

Differential Revision: https://reviews.llvm.org/D39570

llvm-svn: 317368
parent dc95dbfc
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment