diff options
author | Peter Collingbourne <peter@pcc.me.uk> | 2012-05-20 01:32:09 +0000 |
---|---|---|
committer | Peter Collingbourne <peter@pcc.me.uk> | 2012-05-20 01:32:09 +0000 |
commit | fcaf5fa89cafe66d2659b711e7c190f3851f4ac5 (patch) | |
tree | 8264fab4fcabc537e109f599772ea2af567f8564 /lib/Transforms/Scalar/LoopUnswitch.cpp | |
parent | a991ea5f7f2df661dc1ad7bd230d3a401dfb6411 (diff) |
Do not pass an invalid domtree to SimplifyInstruction from
LoopUnswitch. Fixes PR12887.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@157140 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Transforms/Scalar/LoopUnswitch.cpp')
-rw-r--r-- | lib/Transforms/Scalar/LoopUnswitch.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/Transforms/Scalar/LoopUnswitch.cpp b/lib/Transforms/Scalar/LoopUnswitch.cpp index 930980f528..58f7739888 100644 --- a/lib/Transforms/Scalar/LoopUnswitch.cpp +++ b/lib/Transforms/Scalar/LoopUnswitch.cpp @@ -1214,8 +1214,8 @@ void LoopUnswitch::SimplifyCode(std::vector<Instruction*> &Worklist, Loop *L) { // See if instruction simplification can hack this up. This is common for // things like "select false, X, Y" after unswitching made the condition be - // 'false'. - if (Value *V = SimplifyInstruction(I, 0, 0, DT)) + // 'false'. TODO: update the domtree properly so we can pass it here. + if (Value *V = SimplifyInstruction(I)) if (LI->replacementPreservesLCSSAForm(I, V)) { ReplaceUsesOfWith(I, V, Worklist, L, LPM); continue; |