[SimplifyCFG] Teach FoldTwoEntryPHINode() to preserve DomTree
authorRoman Lebedev <lebedev.ri@gmail.com>
Sat, 19 Dec 2020 09:48:32 +0000 (12:48 +0300)
committerRoman Lebedev <lebedev.ri@gmail.com>
Sat, 19 Dec 2020 21:18:33 +0000 (00:18 +0300)
commit4be8707e6450fafceaad2fc2ea86dc4b5d4bdd4f
treea60076703710a48e466fea73d1c1a8b243c5b039
parentb43b77ff9b82d53321e401cf1ededdaf30fff407
[SimplifyCFG] Teach FoldTwoEntryPHINode() to preserve DomTree

Still boring, simply drop all edges to successors of DomBlock,
and add an edge to to BB instead.
30 files changed:
llvm/lib/Transforms/Utils/SimplifyCFG.cpp
llvm/test/Transforms/IndVarSimplify/loop_evaluate_1.ll
llvm/test/Transforms/IndVarSimplify/loop_evaluate_2.ll
llvm/test/Transforms/PhaseOrdering/unsigned-multiply-overflow-check.ll
llvm/test/Transforms/SimplifyCFG/ARM/phi-eliminate.ll
llvm/test/Transforms/SimplifyCFG/ARM/select-trunc-i64.ll
llvm/test/Transforms/SimplifyCFG/ARM/speculate-math.ll
llvm/test/Transforms/SimplifyCFG/ARM/speculate-vector-ops.ll
llvm/test/Transforms/SimplifyCFG/ConditionalTrappingConstantExpr.ll
llvm/test/Transforms/SimplifyCFG/PR9946.ll
llvm/test/Transforms/SimplifyCFG/PhiBlockMerge.ll
llvm/test/Transforms/SimplifyCFG/PhiEliminate2.ll
llvm/test/Transforms/SimplifyCFG/PhiEliminate3.ll
llvm/test/Transforms/SimplifyCFG/RISCV/select-trunc-i64.ll
llvm/test/Transforms/SimplifyCFG/UnreachableEliminate.ll
llvm/test/Transforms/SimplifyCFG/X86/PR29163.ll
llvm/test/Transforms/SimplifyCFG/X86/SpeculativeExec.ll
llvm/test/Transforms/SimplifyCFG/X86/safe-low-bit-extract.ll
llvm/test/Transforms/SimplifyCFG/X86/speculate-cttz-ctlz.ll
llvm/test/Transforms/SimplifyCFG/bbi-23595.ll
llvm/test/Transforms/SimplifyCFG/clamp.ll
llvm/test/Transforms/SimplifyCFG/hoist-dbgvalue-inlined.ll
llvm/test/Transforms/SimplifyCFG/no-md-sink.ll
llvm/test/Transforms/SimplifyCFG/opt-for-fuzzing.ll
llvm/test/Transforms/SimplifyCFG/safe-abs.ll
llvm/test/Transforms/SimplifyCFG/signbit-like-value-extension.ll
llvm/test/Transforms/SimplifyCFG/speculate-math.ll
llvm/test/Transforms/SimplifyCFG/speculate-vector-ops.ll
llvm/test/Transforms/SimplifyCFG/speculate-with-offset.ll
llvm/test/Transforms/SimplifyCFG/unsigned-multiplication-will-overflow.ll