diff options
author | Nico Weber <nicolasweber@gmx.de> | 2016-06-24 22:52:39 +0000 |
---|---|---|
committer | Nico Weber <nicolasweber@gmx.de> | 2016-06-24 22:52:39 +0000 |
commit | ae2ef4ccd4b904461009c4444e1ae9006a666c0e (patch) | |
tree | 5e15cef9fa969476d81a31a2f81bd5f1c3371177 /llvm/lib/Transforms/Scalar/JumpThreading.cpp | |
parent | babc13a3e25636bd6b9ee64baf42bca1a8e497cf (diff) | |
download | bcm5719-llvm-ae2ef4ccd4b904461009c4444e1ae9006a666c0e.tar.gz bcm5719-llvm-ae2ef4ccd4b904461009c4444e1ae9006a666c0e.zip |
Revert r273711, it caused PR28298.
llvm-svn: 273743
Diffstat (limited to 'llvm/lib/Transforms/Scalar/JumpThreading.cpp')
-rw-r--r-- | llvm/lib/Transforms/Scalar/JumpThreading.cpp | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/llvm/lib/Transforms/Scalar/JumpThreading.cpp b/llvm/lib/Transforms/Scalar/JumpThreading.cpp index e7957f9599a..1d8d2a5e469 100644 --- a/llvm/lib/Transforms/Scalar/JumpThreading.cpp +++ b/llvm/lib/Transforms/Scalar/JumpThreading.cpp @@ -1746,18 +1746,13 @@ bool JumpThreadingPass::DuplicateCondBranchOnPHIIntoPred( // phi translation. if (Value *IV = SimplifyInstruction(New, BB->getModule()->getDataLayout())) { + delete New; ValueMapping[&*BI] = IV; - if (!New->mayHaveSideEffects()) { - delete New; - New = nullptr; - } } else { - ValueMapping[&*BI] = New; - } - if (New) { // Otherwise, insert the new instruction into the block. New->setName(BI->getName()); PredBB->getInstList().insert(OldPredBranch->getIterator(), New); + ValueMapping[&*BI] = New; } } |