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 | 9a03c732970c77ca1a030d5f8f1010068eb7ce20 (patch) | |
tree | b3d4d3f2fd5bb7727fd09d88bcdd9f54d7390277 /llvm/lib/Transforms/Scalar/LoopUnswitch.cpp | |
parent | 1b7f39de3d58627fa263118a4bca4dda5a5d4bf7 (diff) | |
download | bcm5719-llvm-9a03c732970c77ca1a030d5f8f1010068eb7ce20.tar.gz bcm5719-llvm-9a03c732970c77ca1a030d5f8f1010068eb7ce20.zip |
Do not pass an invalid domtree to SimplifyInstruction from
LoopUnswitch. Fixes PR12887.
llvm-svn: 157140
Diffstat (limited to 'llvm/lib/Transforms/Scalar/LoopUnswitch.cpp')
-rw-r--r-- | llvm/lib/Transforms/Scalar/LoopUnswitch.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/llvm/lib/Transforms/Scalar/LoopUnswitch.cpp b/llvm/lib/Transforms/Scalar/LoopUnswitch.cpp index 930980f528a..58f7739888f 100644 --- a/llvm/lib/Transforms/Scalar/LoopUnswitch.cpp +++ b/llvm/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; |