aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/Transforms
diff options
context:
space:
mode:
authorRoman Lebedev <lebedev.ri@gmail.com>2020-12-17 20:13:03 +0300
committerRoman Lebedev <lebedev.ri@gmail.com>2020-12-18 00:37:22 +0300
commit2ee724863e9cfe631fd7eb7eb63f8b795d68a388 (patch)
tree222f828edd75de45cf4b83ec32dbe486b734fe66 /llvm/lib/Transforms
parent164e0847a59995c0e602c9e708dfb2bf41494780 (diff)
downloadllvm-2ee724863e9cfe631fd7eb7eb63f8b795d68a388.zip
llvm-2ee724863e9cfe631fd7eb7eb63f8b795d68a388.tar.gz
llvm-2ee724863e9cfe631fd7eb7eb63f8b795d68a388.tar.bz2
[SimplifyCFG] ConstantFoldTerminator() already knows how to preserve DomTree
... so just ensure that we pass DomTreeUpdater it into it. Fixes DomTree preservation for a number of tests, all of which are marked as such so that they do not regress.
Diffstat (limited to 'llvm/lib/Transforms')
-rw-r--r--llvm/lib/Transforms/Utils/SimplifyCFG.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/llvm/lib/Transforms/Utils/SimplifyCFG.cpp b/llvm/lib/Transforms/Utils/SimplifyCFG.cpp
index f39ab25e..9e4650f 100644
--- a/llvm/lib/Transforms/Utils/SimplifyCFG.cpp
+++ b/llvm/lib/Transforms/Utils/SimplifyCFG.cpp
@@ -6322,7 +6322,8 @@ bool SimplifyCFGOpt::simplifyOnce(BasicBlock *BB) {
// Check to see if we can constant propagate this terminator instruction
// away...
- Changed |= ConstantFoldTerminator(BB, true);
+ Changed |= ConstantFoldTerminator(BB, /*DeleteDeadConditions=*/true,
+ /*TLI=*/nullptr, DTU);
// Check for and eliminate duplicate PHI nodes in this block.
Changed |= EliminateDuplicatePHINodes(BB);