diff options
author | Rafael Espindola <rafael.espindola@gmail.com> | 2012-04-30 03:53:06 +0000 |
---|---|---|
committer | Rafael Espindola <rafael.espindola@gmail.com> | 2012-04-30 03:53:06 +0000 |
commit | 9719cf329bc398191c65cd1c8cb1161d11c5e947 (patch) | |
tree | 010dfa3bb3251047de6c64f1d50f8e361bed7b26 /lib/Transforms/Scalar/LoopStrengthReduce.cpp | |
parent | 6610b1db55bedaa9e96bf9ff49a19b1a91bd5370 (diff) |
Make sure HoistInsertPosition finds a position that is dominated by all
inputs.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@155809 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Transforms/Scalar/LoopStrengthReduce.cpp')
-rw-r--r-- | lib/Transforms/Scalar/LoopStrengthReduce.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/Transforms/Scalar/LoopStrengthReduce.cpp b/lib/Transforms/Scalar/LoopStrengthReduce.cpp index 558b53332e..c69abcb640 100644 --- a/lib/Transforms/Scalar/LoopStrengthReduce.cpp +++ b/lib/Transforms/Scalar/LoopStrengthReduce.cpp @@ -4140,7 +4140,7 @@ LSRInstance::HoistInsertPosition(BasicBlock::iterator IP, // Attempt to find an insert position in the middle of the block, // instead of at the end, so that it can be used for other expansions. if (IDom == Inst->getParent() && - (!BetterPos || DT.dominates(BetterPos, Inst))) + (!BetterPos || !DT.dominates(Inst, BetterPos))) BetterPos = llvm::next(BasicBlock::iterator(Inst)); } if (!AllDominate) |