From 5cce4aff18c4066c11c927fbe0943dffb6cd76b5 Mon Sep 17 00:00:00 2001 From: Roman Lebedev Date: Thu, 17 Dec 2020 00:11:42 +0300 Subject: [PATCH] [SimplifyCFG] TryToSimplifyUncondBranchFromEmptyBlock() already knows how to preserve DomTree ... so just ensure that we pass DomTreeUpdater it into it. Fixes DomTree preservation for a large number of tests, all of which are marked as such so that they do not regress. --- llvm/lib/Transforms/Utils/SimplifyCFG.cpp | 2 +- .../ADCE/2003-11-16-MissingPostDominanceInfo.ll | 4 ++-- llvm/test/Transforms/Inline/invoke_test-2.ll | 2 +- .../Transforms/InstCombine/2004-09-20-BadLoadCombine2.ll | 2 +- llvm/test/Transforms/JumpThreading/lvi-tristate.ll | 2 +- llvm/test/Transforms/LoopDeletion/dcetest.ll | 2 +- llvm/test/Transforms/LoopSimplify/do-preheader-dbg.ll | 2 +- llvm/test/Transforms/LoopSimplify/for-preheader-dbg.ll | 2 +- llvm/test/Transforms/LoopUnroll/peel-loop.ll | 2 +- llvm/test/Transforms/LoopUnswitch/2015-06-17-Metadata.ll | 2 +- llvm/test/Transforms/LoopUnswitch/infinite-loop.ll | 2 +- llvm/test/Transforms/LoopVectorize/ARM/mve-qabs.ll | 2 +- llvm/test/Transforms/LoopVectorize/ARM/mve-reductions.ll | 2 +- llvm/test/Transforms/LoopVectorize/ARM/pointer_iv.ll | 2 +- .../LoopVectorize/ARM/tail-fold-multiple-icmps.ll | 2 +- .../Transforms/LoopVectorize/X86/float-induction-x86.ll | 2 +- .../X86/x86-interleaved-accesses-masked-group.ll | 4 ++-- llvm/test/Transforms/LoopVectorize/X86/x86-predication.ll | 2 +- llvm/test/Transforms/LoopVectorize/float-induction.ll | 6 +++--- llvm/test/Transforms/LoopVectorize/hints-trans.ll | 4 ++-- .../Transforms/LoopVectorize/if-pred-not-when-safe.ll | 2 +- llvm/test/Transforms/LoopVectorize/tbaa-nodep.ll | 4 ++-- llvm/test/Transforms/LoopVectorize/vectorize-once.ll | 2 +- llvm/test/Transforms/SCCP/2002-05-21-InvalidSimplify.ll | 2 +- .../SimplifyCFG/2003-08-17-BranchFoldOrdering.ll | 2 +- llvm/test/Transforms/SimplifyCFG/2003-08-17-FoldSwitch.ll | 2 +- llvm/test/Transforms/SimplifyCFG/2006-06-12-InfLoop.ll | 2 +- llvm/test/Transforms/SimplifyCFG/2006-08-03-Crash.ll | 2 +- llvm/test/Transforms/SimplifyCFG/2007-12-21-Crash.ll | 2 +- .../Transforms/SimplifyCFG/2008-09-17-SpeculativeHoist.ll | 2 +- llvm/test/Transforms/SimplifyCFG/2009-05-12-externweak.ll | 2 +- llvm/test/Transforms/SimplifyCFG/AArch64/cttz-ctlz.ll | 2 +- llvm/test/Transforms/SimplifyCFG/AMDGPU/cttz-ctlz.ll | 4 ++-- llvm/test/Transforms/SimplifyCFG/ARM/cttz-ctlz.ll | 2 +- llvm/test/Transforms/SimplifyCFG/ARM/select-costs.ll | 8 ++++---- .../ARM/switch-to-lookup-table-constant-expr.ll | 2 +- .../test/Transforms/SimplifyCFG/EqualPHIEdgeBlockMerge.ll | 2 +- .../Transforms/SimplifyCFG/ForwardSwitchConditionToPHI.ll | 4 ++-- llvm/test/Transforms/SimplifyCFG/Mips/cttz-ctlz.ll | 2 +- llvm/test/Transforms/SimplifyCFG/PR16069.ll | 2 +- llvm/test/Transforms/SimplifyCFG/PR17073.ll | 2 +- .../Transforms/SimplifyCFG/PR27615-simplify-cond-br.ll | 4 ++-- llvm/test/Transforms/SimplifyCFG/PhiBlockMerge2.ll | 2 +- llvm/test/Transforms/SimplifyCFG/PhiEliminate.ll | 2 +- .../test/Transforms/SimplifyCFG/PowerPC/cttz-ctlz-spec.ll | 2 +- llvm/test/Transforms/SimplifyCFG/UncondBranchToHeader.ll | 2 +- .../Transforms/SimplifyCFG/X86/disable-lookup-table.ll | 2 +- .../SimplifyCFG/X86/fold-branch-debuginvariant.ll | 4 ++-- llvm/test/Transforms/SimplifyCFG/X86/remove-debug-2.ll | 2 +- llvm/test/Transforms/SimplifyCFG/X86/remove-debug.ll | 2 +- llvm/test/Transforms/SimplifyCFG/attr-convergent.ll | 2 +- llvm/test/Transforms/SimplifyCFG/branch-cond-merge.ll | 4 ++-- llvm/test/Transforms/SimplifyCFG/branch-cond-prop.ll | 2 +- llvm/test/Transforms/SimplifyCFG/common-code-hoisting.ll | 6 +++--- llvm/test/Transforms/SimplifyCFG/constantexprs.ll | 2 +- .../SimplifyCFG/drop-debug-loc-when-speculating.ll | 2 +- llvm/test/Transforms/SimplifyCFG/extract-cost.ll | 2 +- llvm/test/Transforms/SimplifyCFG/guards.ll | 2 +- llvm/test/Transforms/SimplifyCFG/merge-cond-stores-2.ll | 2 +- llvm/test/Transforms/SimplifyCFG/multiple-phis.ll | 2 +- .../SimplifyCFG/no_speculative_loads_with_asan.ll | 2 +- .../SimplifyCFG/no_speculative_loads_with_tsan.ll | 2 +- .../SimplifyCFG/phi-to-select-constexpr-icmp.ll | 2 +- .../SimplifyCFG/preserve-branchweights-partial.ll | 4 ++-- .../Transforms/SimplifyCFG/preserve-llvm-loop-metadata.ll | 2 +- .../Transforms/SimplifyCFG/preserve-store-alignment.ll | 2 +- llvm/test/Transforms/SimplifyCFG/select-gep.ll | 2 +- llvm/test/Transforms/SimplifyCFG/speculate-call.ll | 2 +- llvm/test/Transforms/SimplifyCFG/speculate-dbgvalue.ll | 2 +- llvm/test/Transforms/SimplifyCFG/speculate-store.ll | 2 +- .../switch-to-select-multiple-edge-per-block-phi.ll | 2 +- llvm/test/Transforms/SimplifyCFG/switch_undef.ll | 2 +- llvm/test/Transforms/SimplifyCFG/two-entry-phi-return.ll | 2 +- .../test/Transforms/SimplifyCFG/unreachable-cleanuppad.ll | 2 +- 74 files changed, 91 insertions(+), 91 deletions(-) diff --git a/llvm/lib/Transforms/Utils/SimplifyCFG.cpp b/llvm/lib/Transforms/Utils/SimplifyCFG.cpp index d32520ec2035..4ac080b539f5 100644 --- a/llvm/lib/Transforms/Utils/SimplifyCFG.cpp +++ b/llvm/lib/Transforms/Utils/SimplifyCFG.cpp @@ -6076,7 +6076,7 @@ bool SimplifyCFGOpt::simplifyUncondBranch(BranchInst *BI, (LoopHeaders->count(BB) || LoopHeaders->count(Succ))); BasicBlock::iterator I = BB->getFirstNonPHIOrDbg()->getIterator(); if (I->isTerminator() && BB != &BB->getParent()->getEntryBlock() && - !NeedCanonicalLoop && TryToSimplifyUncondBranchFromEmptyBlock(BB)) + !NeedCanonicalLoop && TryToSimplifyUncondBranchFromEmptyBlock(BB, DTU)) return true; // If the only instruction in the block is a seteq/setne comparison against a diff --git a/llvm/test/Transforms/ADCE/2003-11-16-MissingPostDominanceInfo.ll b/llvm/test/Transforms/ADCE/2003-11-16-MissingPostDominanceInfo.ll index f60469a61635..3b4321105f8e 100644 --- a/llvm/test/Transforms/ADCE/2003-11-16-MissingPostDominanceInfo.ll +++ b/llvm/test/Transforms/ADCE/2003-11-16-MissingPostDominanceInfo.ll @@ -1,5 +1,5 @@ -; RUN: opt < %s -adce -simplifycfg -S | grep call -; RUN: opt < %s -adce -adce-remove-loops -simplifycfg -S | grep call +; RUN: opt < %s -adce -simplifycfg -simplifycfg-require-and-preserve-domtree=1 -S | grep call +; RUN: opt < %s -adce -adce-remove-loops -simplifycfg -simplifycfg-require-and-preserve-domtree=1 -S | grep call declare void @exit(i32) diff --git a/llvm/test/Transforms/Inline/invoke_test-2.ll b/llvm/test/Transforms/Inline/invoke_test-2.ll index 6dfd24822e49..ac1822b9bfcd 100644 --- a/llvm/test/Transforms/Inline/invoke_test-2.ll +++ b/llvm/test/Transforms/Inline/invoke_test-2.ll @@ -1,7 +1,7 @@ ; Test that if an invoked function is inlined, and if that function cannot ; throw, that the dead handler is now unreachable. -; RUN: opt < %s -inline -simplifycfg -S | FileCheck %s +; RUN: opt < %s -inline -simplifycfg -simplifycfg-require-and-preserve-domtree=1 -S | FileCheck %s declare void @might_throw() diff --git a/llvm/test/Transforms/InstCombine/2004-09-20-BadLoadCombine2.ll b/llvm/test/Transforms/InstCombine/2004-09-20-BadLoadCombine2.ll index 981a4f301a99..f711db0cb25e 100644 --- a/llvm/test/Transforms/InstCombine/2004-09-20-BadLoadCombine2.ll +++ b/llvm/test/Transforms/InstCombine/2004-09-20-BadLoadCombine2.ll @@ -1,4 +1,4 @@ -; RUN: opt < %s -instcombine -mem2reg -simplifycfg | \ +; RUN: opt < %s -instcombine -mem2reg -simplifycfg -simplifycfg-require-and-preserve-domtree=1 | \ ; RUN: llvm-dis | grep -v store | not grep "i32 1" ; Test to make sure that instcombine does not accidentally propagate the load diff --git a/llvm/test/Transforms/JumpThreading/lvi-tristate.ll b/llvm/test/Transforms/JumpThreading/lvi-tristate.ll index 94fd0e5049c4..ee0140035c3b 100644 --- a/llvm/test/Transforms/JumpThreading/lvi-tristate.ll +++ b/llvm/test/Transforms/JumpThreading/lvi-tristate.ll @@ -1,5 +1,5 @@ ; NOTE: Assertions have been autogenerated by utils/update_test_checks.py -; RUN: opt -jump-threading -simplifycfg -S < %s | FileCheck %s +; RUN: opt -jump-threading -simplifycfg -simplifycfg-require-and-preserve-domtree=1 -S < %s | FileCheck %s declare void @ham() define void @hoge() { diff --git a/llvm/test/Transforms/LoopDeletion/dcetest.ll b/llvm/test/Transforms/LoopDeletion/dcetest.ll index f1e793de03d6..f8de54e5c477 100644 --- a/llvm/test/Transforms/LoopDeletion/dcetest.ll +++ b/llvm/test/Transforms/LoopDeletion/dcetest.ll @@ -1,7 +1,7 @@ ; This is the test case taken from Appel's book that illustrates a hard case ; that SCCP gets right, and when followed by ADCE, is completely eliminated ; -; RUN: opt < %s -sccp -simplifycfg -indvars -loop-deletion -dce -simplifycfg -S | not grep br +; RUN: opt < %s -sccp -simplifycfg -simplifycfg-require-and-preserve-domtree=1 -indvars -loop-deletion -dce -simplifycfg -simplifycfg-require-and-preserve-domtree=1 -S | not grep br define i32 @"test function"(i32 %i0, i32 %j0) { BB1: diff --git a/llvm/test/Transforms/LoopSimplify/do-preheader-dbg.ll b/llvm/test/Transforms/LoopSimplify/do-preheader-dbg.ll index 7cacc49cd80a..a092eade73a5 100755 --- a/llvm/test/Transforms/LoopSimplify/do-preheader-dbg.ll +++ b/llvm/test/Transforms/LoopSimplify/do-preheader-dbg.ll @@ -1,7 +1,7 @@ ; Confirm that the line number for the do.body.preheader block ; branch is the the start of the loop. -; RUN: opt -simplifycfg -loop-simplify -keep-loops="false" -S <%s | FileCheck %s +; RUN: opt -simplifycfg -simplifycfg-require-and-preserve-domtree=1 -loop-simplify -keep-loops="false" -S <%s | FileCheck %s ; CHECK: do.body.preheader: ; CHECK-NEXT: phi diff --git a/llvm/test/Transforms/LoopSimplify/for-preheader-dbg.ll b/llvm/test/Transforms/LoopSimplify/for-preheader-dbg.ll index 439b72024c3c..c40362e8d5db 100755 --- a/llvm/test/Transforms/LoopSimplify/for-preheader-dbg.ll +++ b/llvm/test/Transforms/LoopSimplify/for-preheader-dbg.ll @@ -1,7 +1,7 @@ ; Confirm that the line number for the for.body.preheader block ; branch is the the start of the loop. -; RUN: opt -simplifycfg -loop-simplify -S <%s | FileCheck %s +; RUN: opt -simplifycfg -simplifycfg-require-and-preserve-domtree=1 -loop-simplify -S <%s | FileCheck %s ; ; CHECK: for.body.preheader: ; CHECK-NEXT: br label %for.body, !dbg ![[DL:[0-9]+]] diff --git a/llvm/test/Transforms/LoopUnroll/peel-loop.ll b/llvm/test/Transforms/LoopUnroll/peel-loop.ll index d9dce0914418..16e2dfcfd99c 100644 --- a/llvm/test/Transforms/LoopUnroll/peel-loop.ll +++ b/llvm/test/Transforms/LoopUnroll/peel-loop.ll @@ -1,4 +1,4 @@ -; RUN: opt < %s -S -loop-unroll -unroll-force-peel-count=3 -verify-dom-info -simplifycfg -instcombine | FileCheck %s +; RUN: opt < %s -S -loop-unroll -unroll-force-peel-count=3 -verify-dom-info -simplifycfg -simplifycfg-require-and-preserve-domtree=1 -instcombine | FileCheck %s ; RUN: opt < %s -S -passes='require,loop-unroll,simplify-cfg,instcombine' -unroll-force-peel-count=3 -verify-dom-info | FileCheck %s ; RUN: opt < %s -S -passes='require,loop-unroll,simplify-cfg,instcombine' -unroll-force-peel-count=3 -verify-dom-info | FileCheck %s diff --git a/llvm/test/Transforms/LoopUnswitch/2015-06-17-Metadata.ll b/llvm/test/Transforms/LoopUnswitch/2015-06-17-Metadata.ll index 07be4111971c..4c5ecc9f7406 100644 --- a/llvm/test/Transforms/LoopUnswitch/2015-06-17-Metadata.ll +++ b/llvm/test/Transforms/LoopUnswitch/2015-06-17-Metadata.ll @@ -1,4 +1,4 @@ -;RUN: opt -loop-unswitch -enable-new-pm=0 -simplifycfg -S < %s | FileCheck %s +;RUN: opt -loop-unswitch -enable-new-pm=0 -simplifycfg -simplifycfg-require-and-preserve-domtree=1 -S < %s | FileCheck %s define i32 @foo(i32 %a, i32 %b) { ;CHECK-LABEL: foo diff --git a/llvm/test/Transforms/LoopUnswitch/infinite-loop.ll b/llvm/test/Transforms/LoopUnswitch/infinite-loop.ll index ffd286f23fe2..6e9cfa9559ce 100644 --- a/llvm/test/Transforms/LoopUnswitch/infinite-loop.ll +++ b/llvm/test/Transforms/LoopUnswitch/infinite-loop.ll @@ -1,7 +1,7 @@ ; REQUIRES: asserts ; RUN: opt -loop-unswitch -enable-new-pm=0 -disable-output -stats -info-output-file - < %s | FileCheck --check-prefix=STATS %s ; RUN: opt -loop-unswitch -enable-new-pm=0 -enable-mssa-loop-dependency=true -verify-memoryssa -disable-output -stats -info-output-file - < %s | FileCheck --check-prefix=STATS %s -; RUN: opt -loop-unswitch -enable-new-pm=0 -simplifycfg -S < %s | FileCheck %s +; RUN: opt -loop-unswitch -enable-new-pm=0 -simplifycfg -simplifycfg-require-and-preserve-domtree=1 -S < %s | FileCheck %s ; PR5373 ; Loop unswitching shouldn't trivially unswitch the true case of condition %a diff --git a/llvm/test/Transforms/LoopVectorize/ARM/mve-qabs.ll b/llvm/test/Transforms/LoopVectorize/ARM/mve-qabs.ll index 903b467c7581..9df6095fcf5a 100644 --- a/llvm/test/Transforms/LoopVectorize/ARM/mve-qabs.ll +++ b/llvm/test/Transforms/LoopVectorize/ARM/mve-qabs.ll @@ -1,5 +1,5 @@ ; NOTE: Assertions have been autogenerated by utils/update_test_checks.py -; RUN: opt -loop-vectorize -instcombine -simplifycfg < %s -S -o - | FileCheck %s +; RUN: opt -loop-vectorize -instcombine -simplifycfg -simplifycfg-require-and-preserve-domtree=1 < %s -S -o - | FileCheck %s target datalayout = "e-m:e-p:32:32-Fi8-i64:64-v128:64:128-a:0:32-n32-S64" target triple = "thumbv8.1m.main-arm-none-eabi" diff --git a/llvm/test/Transforms/LoopVectorize/ARM/mve-reductions.ll b/llvm/test/Transforms/LoopVectorize/ARM/mve-reductions.ll index 53ef21ec0d32..fad08b91259b 100644 --- a/llvm/test/Transforms/LoopVectorize/ARM/mve-reductions.ll +++ b/llvm/test/Transforms/LoopVectorize/ARM/mve-reductions.ll @@ -1,5 +1,5 @@ ; NOTE: Assertions have been autogenerated by utils/update_test_checks.py -; RUN: opt -loop-vectorize -instcombine -simplifycfg -tail-predication=enabled < %s -S -o - | FileCheck %s +; RUN: opt -loop-vectorize -instcombine -simplifycfg -simplifycfg-require-and-preserve-domtree=1 -tail-predication=enabled < %s -S -o - | FileCheck %s target datalayout = "e-m:e-p:32:32-Fi8-i64:64-v128:64:128-a:0:32-n32-S64" target triple = "thumbv8.1m.main-arm-none-eabi" diff --git a/llvm/test/Transforms/LoopVectorize/ARM/pointer_iv.ll b/llvm/test/Transforms/LoopVectorize/ARM/pointer_iv.ll index 21c0d8be8a37..b30e342d9a3f 100644 --- a/llvm/test/Transforms/LoopVectorize/ARM/pointer_iv.ll +++ b/llvm/test/Transforms/LoopVectorize/ARM/pointer_iv.ll @@ -1,5 +1,5 @@ ; NOTE: Assertions have been autogenerated by utils/update_test_checks.py -; RUN: opt -loop-vectorize -S -mtriple=thumbv8.1m.main-none-none-eabi -mattr=+mve.fp,mve1beat -dce -instcombine --simplifycfg -tail-predication=disabled < %s | FileCheck %s +; RUN: opt -loop-vectorize -S -mtriple=thumbv8.1m.main-none-none-eabi -mattr=+mve.fp,mve1beat -dce -instcombine --simplifycfg -simplifycfg-require-and-preserve-domtree=1 -tail-predication=disabled < %s | FileCheck %s target datalayout = "e-m:e-p:32:32-Fi8-i64:64-v128:64:128-a:0:32-n32-S64" target triple = "thumbv8.1m.main-none-none-eabi" diff --git a/llvm/test/Transforms/LoopVectorize/ARM/tail-fold-multiple-icmps.ll b/llvm/test/Transforms/LoopVectorize/ARM/tail-fold-multiple-icmps.ll index 075abffb4283..d47224e07976 100644 --- a/llvm/test/Transforms/LoopVectorize/ARM/tail-fold-multiple-icmps.ll +++ b/llvm/test/Transforms/LoopVectorize/ARM/tail-fold-multiple-icmps.ll @@ -1,5 +1,5 @@ ; NOTE: Assertions have been autogenerated by utils/update_test_checks.py -; RUN: opt -mtriple=thumbv8.1m.main-none-none-eabi -mattr=+mve -tail-predication=enabled -loop-vectorize -instcombine -simplifycfg %s -S -o - | FileCheck %s +; RUN: opt -mtriple=thumbv8.1m.main-none-none-eabi -mattr=+mve -tail-predication=enabled -loop-vectorize -instcombine -simplifycfg -simplifycfg-require-and-preserve-domtree=1 %s -S -o - | FileCheck %s target datalayout = "e-m:e-p:32:32-Fi8-i64:64-v128:64:128-a:0:32-n32-S64" diff --git a/llvm/test/Transforms/LoopVectorize/X86/float-induction-x86.ll b/llvm/test/Transforms/LoopVectorize/X86/float-induction-x86.ll index ced3f482561b..4947f84afd71 100644 --- a/llvm/test/Transforms/LoopVectorize/X86/float-induction-x86.ll +++ b/llvm/test/Transforms/LoopVectorize/X86/float-induction-x86.ll @@ -1,5 +1,5 @@ ; NOTE: Assertions have been autogenerated by utils/update_test_checks.py -; RUN: opt < %s -O3 -simplifycfg -keep-loops=false -mcpu=core-avx2 -mtriple=x86_64-unknown-linux-gnu -S | FileCheck --check-prefix AUTO_VEC %s +; RUN: opt < %s -O3 -simplifycfg -simplifycfg-require-and-preserve-domtree=1 -keep-loops=false -mcpu=core-avx2 -mtriple=x86_64-unknown-linux-gnu -S | FileCheck --check-prefix AUTO_VEC %s target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" diff --git a/llvm/test/Transforms/LoopVectorize/X86/x86-interleaved-accesses-masked-group.ll b/llvm/test/Transforms/LoopVectorize/X86/x86-interleaved-accesses-masked-group.ll index bd00cca9a70e..08dc1ba01ab8 100644 --- a/llvm/test/Transforms/LoopVectorize/X86/x86-interleaved-accesses-masked-group.ll +++ b/llvm/test/Transforms/LoopVectorize/X86/x86-interleaved-accesses-masked-group.ll @@ -1,6 +1,6 @@ ; NOTE: Assertions have been autogenerated by utils/update_test_checks.py -; RUN: opt -mcpu=skx -S -loop-vectorize -instcombine -simplifycfg -force-vector-width=8 -force-vector-interleave=1 -enable-interleaved-mem-accesses < %s | FileCheck %s -check-prefix=DISABLED_MASKED_STRIDED -; RUN: opt -mcpu=skx -S -loop-vectorize -instcombine -simplifycfg -force-vector-width=8 -force-vector-interleave=1 -enable-interleaved-mem-accesses -enable-masked-interleaved-mem-accesses < %s | FileCheck %s -check-prefix=ENABLED_MASKED_STRIDED +; RUN: opt -mcpu=skx -S -loop-vectorize -instcombine -simplifycfg -simplifycfg-require-and-preserve-domtree=1 -force-vector-width=8 -force-vector-interleave=1 -enable-interleaved-mem-accesses < %s | FileCheck %s -check-prefix=DISABLED_MASKED_STRIDED +; RUN: opt -mcpu=skx -S -loop-vectorize -instcombine -simplifycfg -simplifycfg-require-and-preserve-domtree=1 -force-vector-width=8 -force-vector-interleave=1 -enable-interleaved-mem-accesses -enable-masked-interleaved-mem-accesses < %s | FileCheck %s -check-prefix=ENABLED_MASKED_STRIDED target datalayout = "e-m:e-p:32:32-f64:32:64-f80:32-n8:16:32-S128" target triple = "i386-unknown-linux-gnu" diff --git a/llvm/test/Transforms/LoopVectorize/X86/x86-predication.ll b/llvm/test/Transforms/LoopVectorize/X86/x86-predication.ll index 45d843c9d580..2142303ac308 100644 --- a/llvm/test/Transforms/LoopVectorize/X86/x86-predication.ll +++ b/llvm/test/Transforms/LoopVectorize/X86/x86-predication.ll @@ -1,4 +1,4 @@ -; RUN: opt < %s -mattr=avx -force-vector-width=2 -force-vector-interleave=1 -loop-vectorize -simplifycfg -S | FileCheck %s +; RUN: opt < %s -mattr=avx -force-vector-width=2 -force-vector-interleave=1 -loop-vectorize -simplifycfg -simplifycfg-require-and-preserve-domtree=1 -S | FileCheck %s ; RUN: opt -mcpu=skylake-avx512 -S -force-vector-width=8 -force-vector-interleave=1 -loop-vectorize < %s | FileCheck %s --check-prefix=SINK-GATHER target datalayout = "e-p:64:64:64-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64-f32:32:32-f64:64:64-v64:64:64-v128:128:128-a0:0:64-s0:64:64-f80:128:128-n8:16:32:64-S128" diff --git a/llvm/test/Transforms/LoopVectorize/float-induction.ll b/llvm/test/Transforms/LoopVectorize/float-induction.ll index 7d22ba18a289..30c0387f8192 100644 --- a/llvm/test/Transforms/LoopVectorize/float-induction.ll +++ b/llvm/test/Transforms/LoopVectorize/float-induction.ll @@ -1,7 +1,7 @@ ; RUN: opt < %s -loop-vectorize -force-vector-interleave=1 -force-vector-width=4 -dce -instcombine -S | FileCheck --check-prefix VEC4_INTERL1 %s ; RUN: opt < %s -loop-vectorize -force-vector-interleave=2 -force-vector-width=4 -dce -instcombine -S | FileCheck --check-prefix VEC4_INTERL2 %s ; RUN: opt < %s -loop-vectorize -force-vector-interleave=2 -force-vector-width=1 -dce -instcombine -S | FileCheck --check-prefix VEC1_INTERL2 %s -; RUN: opt < %s -loop-vectorize -force-vector-interleave=1 -force-vector-width=2 -dce -simplifycfg -instcombine -simplifycfg -keep-loops=false -S | FileCheck --check-prefix VEC2_INTERL1_PRED_STORE %s +; RUN: opt < %s -loop-vectorize -force-vector-interleave=1 -force-vector-width=2 -dce -simplifycfg -simplifycfg-require-and-preserve-domtree=1 -instcombine -simplifycfg -simplifycfg-require-and-preserve-domtree=1 -keep-loops=false -S | FileCheck --check-prefix VEC2_INTERL1_PRED_STORE %s @fp_inc = common global float 0.000000e+00, align 4 @@ -232,10 +232,10 @@ for.body: ; preds = %for.body, %for.body %exitcond = icmp eq i32 %lftr.wideiv, %N br i1 %exitcond, label %for.end.loopexit, label %for.body -for.end.loopexit: +for.end.loopexit: br label %for.end -for.end: +for.end: ret void } diff --git a/llvm/test/Transforms/LoopVectorize/hints-trans.ll b/llvm/test/Transforms/LoopVectorize/hints-trans.ll index aa7af3de09d2..144d27463391 100644 --- a/llvm/test/Transforms/LoopVectorize/hints-trans.ll +++ b/llvm/test/Transforms/LoopVectorize/hints-trans.ll @@ -1,5 +1,5 @@ -; RUN: opt -S -loop-vectorize -force-vector-interleave=1 -force-vector-width=4 -instsimplify -simplifycfg < %s | FileCheck %s -; Note: -instsimplify -simplifycfg remove the (now dead) original loop, making +; RUN: opt -S -loop-vectorize -force-vector-interleave=1 -force-vector-width=4 -instsimplify -simplifycfg -simplifycfg-require-and-preserve-domtree=1 < %s | FileCheck %s +; Note: -instsimplify -simplifycfg -simplifycfg-require-and-preserve-domtree=1 remove the (now dead) original loop, making ; it easy to test that the llvm.loop.unroll.disable hint is still present. target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128" diff --git a/llvm/test/Transforms/LoopVectorize/if-pred-not-when-safe.ll b/llvm/test/Transforms/LoopVectorize/if-pred-not-when-safe.ll index b3e2a5425a05..f8045edcfb7d 100644 --- a/llvm/test/Transforms/LoopVectorize/if-pred-not-when-safe.ll +++ b/llvm/test/Transforms/LoopVectorize/if-pred-not-when-safe.ll @@ -1,4 +1,4 @@ -; RUN: opt -S -force-vector-width=2 -force-vector-interleave=1 -loop-vectorize -verify-loop-info -simplifycfg < %s | FileCheck %s +; RUN: opt -S -force-vector-width=2 -force-vector-interleave=1 -loop-vectorize -verify-loop-info -simplifycfg -simplifycfg-require-and-preserve-domtree=1 < %s | FileCheck %s target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128" diff --git a/llvm/test/Transforms/LoopVectorize/tbaa-nodep.ll b/llvm/test/Transforms/LoopVectorize/tbaa-nodep.ll index af89f6e5f060..7b5835e34f32 100644 --- a/llvm/test/Transforms/LoopVectorize/tbaa-nodep.ll +++ b/llvm/test/Transforms/LoopVectorize/tbaa-nodep.ll @@ -1,5 +1,5 @@ -; RUN: opt < %s -tbaa -basic-aa -loop-vectorize -force-vector-interleave=1 -force-vector-width=4 -dce -instcombine -simplifycfg -S | FileCheck %s -; RUN: opt < %s -basic-aa -loop-vectorize -force-vector-interleave=1 -force-vector-width=4 -dce -instcombine -simplifycfg -S | FileCheck %s --check-prefix=CHECK-NOTBAA +; RUN: opt < %s -tbaa -basic-aa -loop-vectorize -force-vector-interleave=1 -force-vector-width=4 -dce -instcombine -simplifycfg -simplifycfg-require-and-preserve-domtree=1 -S | FileCheck %s +; RUN: opt < %s -basic-aa -loop-vectorize -force-vector-interleave=1 -force-vector-width=4 -dce -instcombine -simplifycfg -simplifycfg-require-and-preserve-domtree=1 -S | FileCheck %s --check-prefix=CHECK-NOTBAA target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128" ; Function Attrs: nounwind uwtable diff --git a/llvm/test/Transforms/LoopVectorize/vectorize-once.ll b/llvm/test/Transforms/LoopVectorize/vectorize-once.ll index 04c2463665c0..f3a87e7ab1d8 100644 --- a/llvm/test/Transforms/LoopVectorize/vectorize-once.ll +++ b/llvm/test/Transforms/LoopVectorize/vectorize-once.ll @@ -1,4 +1,4 @@ -; RUN: opt < %s -loop-vectorize -force-vector-interleave=1 -force-vector-width=4 -dce -instcombine -S -simplifycfg | FileCheck %s +; RUN: opt < %s -loop-vectorize -force-vector-interleave=1 -force-vector-width=4 -dce -instcombine -S -simplifycfg -simplifycfg-require-and-preserve-domtree=1 | FileCheck %s target datalayout = "e-p:64:64:64-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64-f32:32:32-f64:64:64-v64:64:64-v128:128:128-a0:0:64-s0:64:64-f80:128:128-n8:16:32:64-S128" diff --git a/llvm/test/Transforms/SCCP/2002-05-21-InvalidSimplify.ll b/llvm/test/Transforms/SCCP/2002-05-21-InvalidSimplify.ll index f02a29379b86..e09778ea00de 100644 --- a/llvm/test/Transforms/SCCP/2002-05-21-InvalidSimplify.ll +++ b/llvm/test/Transforms/SCCP/2002-05-21-InvalidSimplify.ll @@ -2,7 +2,7 @@ ; this is in fact NOT the case, so the return should still be alive in the code ; after sccp and CFG simplification have been performed. ; -; RUN: opt < %s -sccp -simplifycfg -S | \ +; RUN: opt < %s -sccp -simplifycfg -simplifycfg-require-and-preserve-domtree=1 -S | \ ; RUN: grep ret define void @old_main() { diff --git a/llvm/test/Transforms/SimplifyCFG/2003-08-17-BranchFoldOrdering.ll b/llvm/test/Transforms/SimplifyCFG/2003-08-17-BranchFoldOrdering.ll index 570f15258f07..34fafeb3a933 100644 --- a/llvm/test/Transforms/SimplifyCFG/2003-08-17-BranchFoldOrdering.ll +++ b/llvm/test/Transforms/SimplifyCFG/2003-08-17-BranchFoldOrdering.ll @@ -3,7 +3,7 @@ ; due to the fact that the SimplifyCFG function does not use ; the ConstantFoldTerminator function. -; RUN: opt < %s -simplifycfg -S | FileCheck %s +; RUN: opt < %s -simplifycfg -simplifycfg-require-and-preserve-domtree=1 -S | FileCheck %s ; CHECK-NOT: br i1 %c2 diff --git a/llvm/test/Transforms/SimplifyCFG/2003-08-17-FoldSwitch.ll b/llvm/test/Transforms/SimplifyCFG/2003-08-17-FoldSwitch.ll index a81e7a6caaa3..a7583e4fe30f 100644 --- a/llvm/test/Transforms/SimplifyCFG/2003-08-17-FoldSwitch.ll +++ b/llvm/test/Transforms/SimplifyCFG/2003-08-17-FoldSwitch.ll @@ -1,5 +1,5 @@ ; NOTE: Assertions have been autogenerated by update_test_checks.py -; RUN: opt < %s -simplifycfg -S | FileCheck %s +; RUN: opt < %s -simplifycfg -simplifycfg-require-and-preserve-domtree=1 -S | FileCheck %s ; Test normal folding define i32 @test1() { diff --git a/llvm/test/Transforms/SimplifyCFG/2006-06-12-InfLoop.ll b/llvm/test/Transforms/SimplifyCFG/2006-06-12-InfLoop.ll index 21cfb2615ff7..19a2d85b6b04 100644 --- a/llvm/test/Transforms/SimplifyCFG/2006-06-12-InfLoop.ll +++ b/llvm/test/Transforms/SimplifyCFG/2006-06-12-InfLoop.ll @@ -1,4 +1,4 @@ -; RUN: opt < %s -simplifycfg -disable-output +; RUN: opt < %s -simplifycfg -simplifycfg-require-and-preserve-domtree=1 -disable-output ; END. define void @main(i32 %c) { diff --git a/llvm/test/Transforms/SimplifyCFG/2006-08-03-Crash.ll b/llvm/test/Transforms/SimplifyCFG/2006-08-03-Crash.ll index 6003bfb23588..ddf336e3ae2d 100644 --- a/llvm/test/Transforms/SimplifyCFG/2006-08-03-Crash.ll +++ b/llvm/test/Transforms/SimplifyCFG/2006-08-03-Crash.ll @@ -1,4 +1,4 @@ -; RUN: opt < %s -gvn -simplifycfg -disable-output +; RUN: opt < %s -gvn -simplifycfg -simplifycfg-require-and-preserve-domtree=1 -disable-output ; PR867 target datalayout = "E-p:32:32" diff --git a/llvm/test/Transforms/SimplifyCFG/2007-12-21-Crash.ll b/llvm/test/Transforms/SimplifyCFG/2007-12-21-Crash.ll index 99041ede5d98..5de5405d8a25 100644 --- a/llvm/test/Transforms/SimplifyCFG/2007-12-21-Crash.ll +++ b/llvm/test/Transforms/SimplifyCFG/2007-12-21-Crash.ll @@ -1,4 +1,4 @@ -;RUN: opt < %s -simplifycfg -disable-output +;RUN: opt < %s -simplifycfg -simplifycfg-require-and-preserve-domtree=1 -disable-output target datalayout = "e-p:32:32:32-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:32:64-f32:32:32-f64:32:64-v64:64:64-v128:128:128-a0:0:64-f80:128:128" define i32 @bork() nounwind { diff --git a/llvm/test/Transforms/SimplifyCFG/2008-09-17-SpeculativeHoist.ll b/llvm/test/Transforms/SimplifyCFG/2008-09-17-SpeculativeHoist.ll index f864184eb844..b49c6ba0f813 100644 --- a/llvm/test/Transforms/SimplifyCFG/2008-09-17-SpeculativeHoist.ll +++ b/llvm/test/Transforms/SimplifyCFG/2008-09-17-SpeculativeHoist.ll @@ -1,4 +1,4 @@ -; RUN: opt < %s -simplifycfg -disable-output +; RUN: opt < %s -simplifycfg -simplifycfg-require-and-preserve-domtree=1 -disable-output ; PR 2800 define void @foo() { diff --git a/llvm/test/Transforms/SimplifyCFG/2009-05-12-externweak.ll b/llvm/test/Transforms/SimplifyCFG/2009-05-12-externweak.ll index faf3f5f8b2a7..a1a78d713750 100644 --- a/llvm/test/Transforms/SimplifyCFG/2009-05-12-externweak.ll +++ b/llvm/test/Transforms/SimplifyCFG/2009-05-12-externweak.ll @@ -1,4 +1,4 @@ -; RUN: opt < %s -simplifycfg -S | not grep select +; RUN: opt < %s -simplifycfg -simplifycfg-require-and-preserve-domtree=1 -S | not grep select ; ModuleID = '' target datalayout = "e-p:32:32:32-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:32:64-f32:32:32-f64:32:64-v64:64:64-v128:128:128-a0:0:64-f80:128:128" target triple = "i386-apple-darwin10.0" diff --git a/llvm/test/Transforms/SimplifyCFG/AArch64/cttz-ctlz.ll b/llvm/test/Transforms/SimplifyCFG/AArch64/cttz-ctlz.ll index e32d711143dc..795ed74440e7 100644 --- a/llvm/test/Transforms/SimplifyCFG/AArch64/cttz-ctlz.ll +++ b/llvm/test/Transforms/SimplifyCFG/AArch64/cttz-ctlz.ll @@ -1,4 +1,4 @@ -; RUN: opt -S -simplifycfg -mtriple=aarch64 < %s | FileCheck %s +; RUN: opt -S -simplifycfg -simplifycfg-require-and-preserve-domtree=1 -mtriple=aarch64 < %s | FileCheck %s define i32 @ctlz(i32 %A) { ; CHECK-LABEL: @ctlz( diff --git a/llvm/test/Transforms/SimplifyCFG/AMDGPU/cttz-ctlz.ll b/llvm/test/Transforms/SimplifyCFG/AMDGPU/cttz-ctlz.ll index dfefff90877e..c213ad8dd32a 100644 --- a/llvm/test/Transforms/SimplifyCFG/AMDGPU/cttz-ctlz.ll +++ b/llvm/test/Transforms/SimplifyCFG/AMDGPU/cttz-ctlz.ll @@ -1,5 +1,5 @@ -; RUN: opt -S -simplifycfg -mtriple=amdgcn-unknown-unknown -mcpu=tahiti < %s | FileCheck -check-prefix=SI -check-prefix=ALL %s -; RUN: opt -S -simplifycfg -mtriple=amdgcn-unknown-unknown -mcpu=tonga < %s | FileCheck -check-prefix=SI -check-prefix=ALL %s +; RUN: opt -S -simplifycfg -simplifycfg-require-and-preserve-domtree=1 -mtriple=amdgcn-unknown-unknown -mcpu=tahiti < %s | FileCheck -check-prefix=SI -check-prefix=ALL %s +; RUN: opt -S -simplifycfg -simplifycfg-require-and-preserve-domtree=1 -mtriple=amdgcn-unknown-unknown -mcpu=tonga < %s | FileCheck -check-prefix=SI -check-prefix=ALL %s define i64 @test1(i64 %A) { diff --git a/llvm/test/Transforms/SimplifyCFG/ARM/cttz-ctlz.ll b/llvm/test/Transforms/SimplifyCFG/ARM/cttz-ctlz.ll index 22f5e9f3cc1d..f634a49a4fe2 100644 --- a/llvm/test/Transforms/SimplifyCFG/ARM/cttz-ctlz.ll +++ b/llvm/test/Transforms/SimplifyCFG/ARM/cttz-ctlz.ll @@ -1,5 +1,5 @@ ; NOTE: Assertions have been autogenerated by utils/update_test_checks.py -; RUN: opt -S -simplifycfg -mtriple=arm -mattr=+v6t2 < %s | FileCheck %s +; RUN: opt -S -simplifycfg -simplifycfg-require-and-preserve-domtree=1 -mtriple=arm -mattr=+v6t2 < %s | FileCheck %s define i32 @ctlz(i32 %A) { ; CHECK-LABEL: @ctlz( diff --git a/llvm/test/Transforms/SimplifyCFG/ARM/select-costs.ll b/llvm/test/Transforms/SimplifyCFG/ARM/select-costs.ll index 5653493b3daa..bd93013da0bf 100644 --- a/llvm/test/Transforms/SimplifyCFG/ARM/select-costs.ll +++ b/llvm/test/Transforms/SimplifyCFG/ARM/select-costs.ll @@ -1,8 +1,8 @@ ; NOTE: Assertions have been autogenerated by utils/update_test_checks.py -; RUN: opt -mtriple=thumbv8.1m.main -simplifycfg -S %s -o - | FileCheck %s --check-prefix=V8M -; RUN: opt -mtriple=thumbv8m.main -simplifycfg -S %s -o - | FileCheck %s --check-prefix=V8M -; RUN: opt -mtriple=thumbv8m.base -simplifycfg -S %s -o - | FileCheck %s --check-prefix=V8M -; RUN: opt -mtriple=armv8a -simplifycfg -S %s -o - | FileCheck %s --check-prefix=V8A +; RUN: opt -mtriple=thumbv8.1m.main -simplifycfg -simplifycfg-require-and-preserve-domtree=1 -S %s -o - | FileCheck %s --check-prefix=V8M +; RUN: opt -mtriple=thumbv8m.main -simplifycfg -simplifycfg-require-and-preserve-domtree=1 -S %s -o - | FileCheck %s --check-prefix=V8M +; RUN: opt -mtriple=thumbv8m.base -simplifycfg -simplifycfg-require-and-preserve-domtree=1 -S %s -o - | FileCheck %s --check-prefix=V8M +; RUN: opt -mtriple=armv8a -simplifycfg -simplifycfg-require-and-preserve-domtree=1 -S %s -o - | FileCheck %s --check-prefix=V8A ; Test that the phis from for.inc.preheader aren't hoisted into sw.bb92 because ; the cost is too great - we can make a better decision later on. diff --git a/llvm/test/Transforms/SimplifyCFG/ARM/switch-to-lookup-table-constant-expr.ll b/llvm/test/Transforms/SimplifyCFG/ARM/switch-to-lookup-table-constant-expr.ll index f67737173426..4137dbce0d8a 100644 --- a/llvm/test/Transforms/SimplifyCFG/ARM/switch-to-lookup-table-constant-expr.ll +++ b/llvm/test/Transforms/SimplifyCFG/ARM/switch-to-lookup-table-constant-expr.ll @@ -1,5 +1,5 @@ ; NOTE: Assertions have been autogenerated by utils/update_test_checks.py -; RUN: opt -S -simplifycfg < %s | FileCheck %s +; RUN: opt -S -simplifycfg -simplifycfg-require-and-preserve-domtree=1 < %s | FileCheck %s target datalayout = "e-m:e-p:32:32-i64:64-v128:64:128-a:0:32-n32-S64" target triple = "armv7a--none-eabi" diff --git a/llvm/test/Transforms/SimplifyCFG/EqualPHIEdgeBlockMerge.ll b/llvm/test/Transforms/SimplifyCFG/EqualPHIEdgeBlockMerge.ll index 6e8593755c7d..8d1a342baaf9 100644 --- a/llvm/test/Transforms/SimplifyCFG/EqualPHIEdgeBlockMerge.ll +++ b/llvm/test/Transforms/SimplifyCFG/EqualPHIEdgeBlockMerge.ll @@ -1,6 +1,6 @@ ; Test merging of blocks with phi nodes. ; -; RUN: opt < %s -simplifycfg -S > %t +; RUN: opt < %s -simplifycfg -simplifycfg-require-and-preserve-domtree=1 -S > %t ; RUN: not grep N: %t ; RUN: not grep X: %t ; RUN: not grep 'switch i32[^U]+%U' %t diff --git a/llvm/test/Transforms/SimplifyCFG/ForwardSwitchConditionToPHI.ll b/llvm/test/Transforms/SimplifyCFG/ForwardSwitchConditionToPHI.ll index b79ccd6a97a7..f0637bb69f54 100644 --- a/llvm/test/Transforms/SimplifyCFG/ForwardSwitchConditionToPHI.ll +++ b/llvm/test/Transforms/SimplifyCFG/ForwardSwitchConditionToPHI.ll @@ -1,6 +1,6 @@ ; NOTE: Assertions have been autogenerated by utils/update_test_checks.py -; RUN: opt < %s -simplifycfg -forward-switch-cond=false -S | FileCheck %s --check-prefix=NO_FWD -; RUN: opt < %s -simplifycfg -forward-switch-cond=true -S | FileCheck %s --check-prefix=FWD +; RUN: opt < %s -simplifycfg -simplifycfg-require-and-preserve-domtree=1 -forward-switch-cond=false -S | FileCheck %s --check-prefix=NO_FWD +; RUN: opt < %s -simplifycfg -simplifycfg-require-and-preserve-domtree=1 -forward-switch-cond=true -S | FileCheck %s --check-prefix=FWD ; RUN: opt < %s -passes='simplify-cfg' -S | FileCheck %s --check-prefix=NO_FWD ; RUN: opt < %s -passes='simplify-cfg' -S | FileCheck %s --check-prefix=FWD diff --git a/llvm/test/Transforms/SimplifyCFG/Mips/cttz-ctlz.ll b/llvm/test/Transforms/SimplifyCFG/Mips/cttz-ctlz.ll index b4bfb51dd142..5a3fd821e221 100644 --- a/llvm/test/Transforms/SimplifyCFG/Mips/cttz-ctlz.ll +++ b/llvm/test/Transforms/SimplifyCFG/Mips/cttz-ctlz.ll @@ -1,4 +1,4 @@ -; RUN: opt -S -simplifycfg -mtriple=mips-linux-gnu < %s | FileCheck %s +; RUN: opt -S -simplifycfg -simplifycfg-require-and-preserve-domtree=1 -mtriple=mips-linux-gnu < %s | FileCheck %s define i32 @ctlz(i32 %A) { ; CHECK-LABEL: @ctlz( diff --git a/llvm/test/Transforms/SimplifyCFG/PR16069.ll b/llvm/test/Transforms/SimplifyCFG/PR16069.ll index 9048b5680c75..489ae46dc1bd 100644 --- a/llvm/test/Transforms/SimplifyCFG/PR16069.ll +++ b/llvm/test/Transforms/SimplifyCFG/PR16069.ll @@ -1,5 +1,5 @@ ; NOTE: Assertions have been autogenerated by update_test_checks.py -; RUN: opt < %s -simplifycfg -S | FileCheck %s +; RUN: opt < %s -simplifycfg -simplifycfg-require-and-preserve-domtree=1 -S | FileCheck %s @b = extern_weak global i32 diff --git a/llvm/test/Transforms/SimplifyCFG/PR17073.ll b/llvm/test/Transforms/SimplifyCFG/PR17073.ll index 7c83c2220f4e..3796c15e211a 100644 --- a/llvm/test/Transforms/SimplifyCFG/PR17073.ll +++ b/llvm/test/Transforms/SimplifyCFG/PR17073.ll @@ -1,5 +1,5 @@ ; NOTE: Assertions have been autogenerated by utils/update_test_checks.py -; RUN: opt < %s -simplifycfg -S | FileCheck %s +; RUN: opt < %s -simplifycfg -simplifycfg-require-and-preserve-domtree=1 -S | FileCheck %s ; In PR17073 ( http://llvm.org/pr17073 ), we illegally hoisted an operation that can trap. ; The first test confirms that we don't do that when the trapping op is reached by the current BB (block1). diff --git a/llvm/test/Transforms/SimplifyCFG/PR27615-simplify-cond-br.ll b/llvm/test/Transforms/SimplifyCFG/PR27615-simplify-cond-br.ll index d6cf1dd1ad69..42cada6ef103 100644 --- a/llvm/test/Transforms/SimplifyCFG/PR27615-simplify-cond-br.ll +++ b/llvm/test/Transforms/SimplifyCFG/PR27615-simplify-cond-br.ll @@ -1,5 +1,5 @@ -; RUN: opt -S -simplifycfg -strip-debug < %s | FileCheck %s -; RUN: opt -S -simplifycfg < %s | FileCheck %s +; RUN: opt -S -simplifycfg -simplifycfg-require-and-preserve-domtree=1 -strip-debug < %s | FileCheck %s +; RUN: opt -S -simplifycfg -simplifycfg-require-and-preserve-domtree=1 < %s | FileCheck %s ; Test case for BUG-27615 ; Test that simplify cond branch produce same result for debug and non-debug builds diff --git a/llvm/test/Transforms/SimplifyCFG/PhiBlockMerge2.ll b/llvm/test/Transforms/SimplifyCFG/PhiBlockMerge2.ll index 269c9eefa95a..593f10fb925a 100644 --- a/llvm/test/Transforms/SimplifyCFG/PhiBlockMerge2.ll +++ b/llvm/test/Transforms/SimplifyCFG/PhiBlockMerge2.ll @@ -2,7 +2,7 @@ ; where the mergedinto block doesn't have any PHI nodes, and is in fact ; dominated by the block-to-be-eliminated ; -; RUN: opt < %s -simplifycfg -S | not grep N: +; RUN: opt < %s -simplifycfg -simplifycfg-require-and-preserve-domtree=1 -S | not grep N: ; declare i1 @foo() diff --git a/llvm/test/Transforms/SimplifyCFG/PhiEliminate.ll b/llvm/test/Transforms/SimplifyCFG/PhiEliminate.ll index c8ae22073ccb..ee3814d62c06 100644 --- a/llvm/test/Transforms/SimplifyCFG/PhiEliminate.ll +++ b/llvm/test/Transforms/SimplifyCFG/PhiEliminate.ll @@ -3,7 +3,7 @@ ; nodes away allows the branches to be eliminated, performing a simple form of ; 'if conversion'. -; RUN: opt < %s -simplifycfg -S > %t.xform +; RUN: opt < %s -simplifycfg -simplifycfg-require-and-preserve-domtree=1 -S > %t.xform ; RUN: not grep phi %t.xform ; RUN: grep ret %t.xform diff --git a/llvm/test/Transforms/SimplifyCFG/PowerPC/cttz-ctlz-spec.ll b/llvm/test/Transforms/SimplifyCFG/PowerPC/cttz-ctlz-spec.ll index 29da28631802..b81a923fa2c7 100644 --- a/llvm/test/Transforms/SimplifyCFG/PowerPC/cttz-ctlz-spec.ll +++ b/llvm/test/Transforms/SimplifyCFG/PowerPC/cttz-ctlz-spec.ll @@ -1,4 +1,4 @@ -; RUN: opt -S -simplifycfg < %s | FileCheck -enable-var-scope %s +; RUN: opt -S -simplifycfg -simplifycfg-require-and-preserve-domtree=1 < %s | FileCheck -enable-var-scope %s target datalayout = "E-m:e-i64:64-n32:64" target triple = "powerpc64-unknown-linux-gnu" diff --git a/llvm/test/Transforms/SimplifyCFG/UncondBranchToHeader.ll b/llvm/test/Transforms/SimplifyCFG/UncondBranchToHeader.ll index 6a265539e75f..70549eef8008 100644 --- a/llvm/test/Transforms/SimplifyCFG/UncondBranchToHeader.ll +++ b/llvm/test/Transforms/SimplifyCFG/UncondBranchToHeader.ll @@ -1,4 +1,4 @@ -; RUN: opt < %s -simplifycfg -S | FileCheck %s +; RUN: opt < %s -simplifycfg -simplifycfg-require-and-preserve-domtree=1 -S | FileCheck %s ; Check that we can get rid of empty block leading to header ; if it does not introduce new edge. diff --git a/llvm/test/Transforms/SimplifyCFG/X86/disable-lookup-table.ll b/llvm/test/Transforms/SimplifyCFG/X86/disable-lookup-table.ll index 423d94624333..0d6b823bd88f 100644 --- a/llvm/test/Transforms/SimplifyCFG/X86/disable-lookup-table.ll +++ b/llvm/test/Transforms/SimplifyCFG/X86/disable-lookup-table.ll @@ -1,5 +1,5 @@ ; NOTE: Assertions have been autogenerated by utils/update_test_checks.py -; RUN: opt < %s -simplifycfg -switch-to-lookup -S -mtriple=x86_64-unknown-linux-gnu | FileCheck %s +; RUN: opt < %s -simplifycfg -simplifycfg-require-and-preserve-domtree=1 -switch-to-lookup -S -mtriple=x86_64-unknown-linux-gnu | FileCheck %s ; RUN: opt < %s -passes='simplify-cfg' -S -mtriple=x86_64-unknown-linux-gnu | FileCheck %s ; In the presence of "-no-jump-tables"="true", simplifycfg should not convert switches to lookup tables. diff --git a/llvm/test/Transforms/SimplifyCFG/X86/fold-branch-debuginvariant.ll b/llvm/test/Transforms/SimplifyCFG/X86/fold-branch-debuginvariant.ll index 242b1230e5fd..44accf871359 100644 --- a/llvm/test/Transforms/SimplifyCFG/X86/fold-branch-debuginvariant.ll +++ b/llvm/test/Transforms/SimplifyCFG/X86/fold-branch-debuginvariant.ll @@ -1,5 +1,5 @@ -; RUN: opt < %s -simplifycfg -S | FileCheck %s -; RUN: opt < %s -strip-debug -simplifycfg -S | FileCheck %s +; RUN: opt < %s -simplifycfg -simplifycfg-require-and-preserve-domtree=1 -S | FileCheck %s +; RUN: opt < %s -strip-debug -simplifycfg -simplifycfg-require-and-preserve-domtree=1 -S | FileCheck %s ; Verify that the and.2 instruction is eliminated even in the presence of a ; preceding debug intrinsic. diff --git a/llvm/test/Transforms/SimplifyCFG/X86/remove-debug-2.ll b/llvm/test/Transforms/SimplifyCFG/X86/remove-debug-2.ll index 2415cf1977ec..a6b77d3f10ad 100644 --- a/llvm/test/Transforms/SimplifyCFG/X86/remove-debug-2.ll +++ b/llvm/test/Transforms/SimplifyCFG/X86/remove-debug-2.ll @@ -1,4 +1,4 @@ -; RUN: opt < %s -simplifycfg -S | FileCheck %s +; RUN: opt < %s -simplifycfg -simplifycfg-require-and-preserve-domtree=1 -S | FileCheck %s ; Check that the debug location for the hoisted store for "ret = 0" is a ; line-0 location. diff --git a/llvm/test/Transforms/SimplifyCFG/X86/remove-debug.ll b/llvm/test/Transforms/SimplifyCFG/X86/remove-debug.ll index 7a69e05267e2..c7f809b6b2c3 100644 --- a/llvm/test/Transforms/SimplifyCFG/X86/remove-debug.ll +++ b/llvm/test/Transforms/SimplifyCFG/X86/remove-debug.ll @@ -1,4 +1,4 @@ -; RUN: opt < %s -simplifycfg -S -hoist-common-insts=true | FileCheck %s +; RUN: opt < %s -simplifycfg -simplifycfg-require-and-preserve-domtree=1 -S -hoist-common-insts=true | FileCheck %s ; TODO: Track the acutal DebugLoc of the hoisted instruction when no-line ; DebugLoc is supported (https://reviews.llvm.org/D24180) diff --git a/llvm/test/Transforms/SimplifyCFG/attr-convergent.ll b/llvm/test/Transforms/SimplifyCFG/attr-convergent.ll index a5f363d055a6..ffc88efdb0dc 100644 --- a/llvm/test/Transforms/SimplifyCFG/attr-convergent.ll +++ b/llvm/test/Transforms/SimplifyCFG/attr-convergent.ll @@ -1,4 +1,4 @@ -; RUN: opt < %s -simplifycfg -S | FileCheck %s +; RUN: opt < %s -simplifycfg -simplifycfg-require-and-preserve-domtree=1 -S | FileCheck %s ; Checks that the SimplifyCFG pass won't duplicate a call to a function marked ; convergent. diff --git a/llvm/test/Transforms/SimplifyCFG/branch-cond-merge.ll b/llvm/test/Transforms/SimplifyCFG/branch-cond-merge.ll index f73e01ca4767..19540d842ee4 100644 --- a/llvm/test/Transforms/SimplifyCFG/branch-cond-merge.ll +++ b/llvm/test/Transforms/SimplifyCFG/branch-cond-merge.ll @@ -1,5 +1,5 @@ -; RUN: opt < %s -simplifycfg -instcombine \ -; RUN: -simplifycfg -S | not grep call +; RUN: opt < %s -simplifycfg -simplifycfg-require-and-preserve-domtree=1 -instcombine \ +; RUN: -simplifycfg -simplifycfg-require-and-preserve-domtree=1 -S | not grep call declare void @bar() diff --git a/llvm/test/Transforms/SimplifyCFG/branch-cond-prop.ll b/llvm/test/Transforms/SimplifyCFG/branch-cond-prop.ll index 448934e72508..e8e3ca3263fb 100644 --- a/llvm/test/Transforms/SimplifyCFG/branch-cond-prop.ll +++ b/llvm/test/Transforms/SimplifyCFG/branch-cond-prop.ll @@ -1,4 +1,4 @@ -; RUN: opt < %s -simplifycfg -S | not grep call +; RUN: opt < %s -simplifycfg -simplifycfg-require-and-preserve-domtree=1 -S | not grep call declare void @bar() diff --git a/llvm/test/Transforms/SimplifyCFG/common-code-hoisting.ll b/llvm/test/Transforms/SimplifyCFG/common-code-hoisting.ll index 23644bed6ce5..ff42d1b3e271 100644 --- a/llvm/test/Transforms/SimplifyCFG/common-code-hoisting.ll +++ b/llvm/test/Transforms/SimplifyCFG/common-code-hoisting.ll @@ -1,7 +1,7 @@ ; NOTE: Assertions have been autogenerated by utils/update_test_checks.py -; RUN: opt -simplifycfg -hoist-common-insts=1 -S < %s | FileCheck %s --check-prefix=HOIST -; RUN: opt -simplifycfg -hoist-common-insts=0 -S < %s | FileCheck %s --check-prefix=NOHOIST -; RUN: opt -simplifycfg -S < %s | FileCheck %s --check-prefix=NOHOIST +; RUN: opt -simplifycfg -simplifycfg-require-and-preserve-domtree=1 -hoist-common-insts=1 -S < %s | FileCheck %s --check-prefix=HOIST +; RUN: opt -simplifycfg -simplifycfg-require-and-preserve-domtree=1 -hoist-common-insts=0 -S < %s | FileCheck %s --check-prefix=NOHOIST +; RUN: opt -simplifycfg -simplifycfg-require-and-preserve-domtree=1 -S < %s | FileCheck %s --check-prefix=NOHOIST ; This example is produced from a very basic C code: ; diff --git a/llvm/test/Transforms/SimplifyCFG/constantexprs.ll b/llvm/test/Transforms/SimplifyCFG/constantexprs.ll index 5cfe2cfceafb..0b9ec68615e1 100644 --- a/llvm/test/Transforms/SimplifyCFG/constantexprs.ll +++ b/llvm/test/Transforms/SimplifyCFG/constantexprs.ll @@ -1,4 +1,4 @@ -; RUN: opt -simplifycfg -S < %s | FileCheck %s +; RUN: opt -simplifycfg -simplifycfg-require-and-preserve-domtree=1 -S < %s | FileCheck %s ; See that we do not crash when queriying cost model about the cost of constant expression extractelement. diff --git a/llvm/test/Transforms/SimplifyCFG/drop-debug-loc-when-speculating.ll b/llvm/test/Transforms/SimplifyCFG/drop-debug-loc-when-speculating.ll index 6298b4e5de35..57e8cf368e53 100644 --- a/llvm/test/Transforms/SimplifyCFG/drop-debug-loc-when-speculating.ll +++ b/llvm/test/Transforms/SimplifyCFG/drop-debug-loc-when-speculating.ll @@ -1,4 +1,4 @@ -; RUN: opt -S -o - %s -simplifycfg | FileCheck %s +; RUN: opt -S -o - %s -simplifycfg -simplifycfg-require-and-preserve-domtree=1 | FileCheck %s declare i1 @make_condition() diff --git a/llvm/test/Transforms/SimplifyCFG/extract-cost.ll b/llvm/test/Transforms/SimplifyCFG/extract-cost.ll index 0a544f585cd1..190ceba0ea95 100644 --- a/llvm/test/Transforms/SimplifyCFG/extract-cost.ll +++ b/llvm/test/Transforms/SimplifyCFG/extract-cost.ll @@ -1,5 +1,5 @@ ; NOTE: Assertions have been autogenerated by utils/update_test_checks.py -; RUN: opt -simplifycfg -S < %s | FileCheck %s +; RUN: opt -simplifycfg -simplifycfg-require-and-preserve-domtree=1 -S < %s | FileCheck %s declare { i32, i1 } @llvm.uadd.with.overflow.i32(i32, i32) #1 diff --git a/llvm/test/Transforms/SimplifyCFG/guards.ll b/llvm/test/Transforms/SimplifyCFG/guards.ll index 1f2d7535fd18..51fe86a13f7d 100644 --- a/llvm/test/Transforms/SimplifyCFG/guards.ll +++ b/llvm/test/Transforms/SimplifyCFG/guards.ll @@ -1,5 +1,5 @@ ; NOTE: Assertions have been autogenerated by utils/update_test_checks.py -; RUN: opt -S -simplifycfg < %s | FileCheck %s +; RUN: opt -S -simplifycfg -simplifycfg-require-and-preserve-domtree=1 < %s | FileCheck %s declare void @llvm.experimental.guard(i1, ...) diff --git a/llvm/test/Transforms/SimplifyCFG/merge-cond-stores-2.ll b/llvm/test/Transforms/SimplifyCFG/merge-cond-stores-2.ll index dcb058b3613b..300f78987b95 100644 --- a/llvm/test/Transforms/SimplifyCFG/merge-cond-stores-2.ll +++ b/llvm/test/Transforms/SimplifyCFG/merge-cond-stores-2.ll @@ -1,5 +1,5 @@ ; NOTE: Assertions have been autogenerated by utils/update_test_checks.py -; RUN: opt -S < %s -simplifycfg -simplifycfg-require-and-preserve-domtree=1 -simplifycfg-merge-cond-stores=true -simplifycfg-merge-cond-stores-aggressively=false -phi-node-folding-threshold=1 | FileCheck %s +; RUN: opt -S < %s -simplifycfg -simplifycfg-merge-cond-stores=true -simplifycfg-merge-cond-stores-aggressively=false -phi-node-folding-threshold=1 | FileCheck %s target datalayout = "e-m:e-p:32:32-i64:64-v128:64:128-a:0:32-n32-S64" target triple = "armv7--linux-gnueabihf" diff --git a/llvm/test/Transforms/SimplifyCFG/multiple-phis.ll b/llvm/test/Transforms/SimplifyCFG/multiple-phis.ll index f8a18a05bab6..5da4ec2628b6 100644 --- a/llvm/test/Transforms/SimplifyCFG/multiple-phis.ll +++ b/llvm/test/Transforms/SimplifyCFG/multiple-phis.ll @@ -1,5 +1,5 @@ ; NOTE: Assertions have been autogenerated by utils/update_test_checks.py -; RUN: opt -simplifycfg -keep-loops=false -S < %s | FileCheck %s +; RUN: opt -simplifycfg -simplifycfg-require-and-preserve-domtree=1 -keep-loops=false -S < %s | FileCheck %s ; RUN: opt -passes='simplify-cfg' -S < %s | FileCheck %s ; It's not worthwhile to if-convert one of the phi nodes and leave diff --git a/llvm/test/Transforms/SimplifyCFG/no_speculative_loads_with_asan.ll b/llvm/test/Transforms/SimplifyCFG/no_speculative_loads_with_asan.ll index dfd0d71a010d..7a4462d3e39e 100644 --- a/llvm/test/Transforms/SimplifyCFG/no_speculative_loads_with_asan.ll +++ b/llvm/test/Transforms/SimplifyCFG/no_speculative_loads_with_asan.ll @@ -1,4 +1,4 @@ -; RUN: opt -simplifycfg -S %s | FileCheck %s +; RUN: opt -simplifycfg -simplifycfg-require-and-preserve-domtree=1 -S %s | FileCheck %s ; Make sure we don't speculate loads under AddressSanitizer. @g = global i32 0, align 4 diff --git a/llvm/test/Transforms/SimplifyCFG/no_speculative_loads_with_tsan.ll b/llvm/test/Transforms/SimplifyCFG/no_speculative_loads_with_tsan.ll index 4792e9565b2d..302b9daadccf 100644 --- a/llvm/test/Transforms/SimplifyCFG/no_speculative_loads_with_tsan.ll +++ b/llvm/test/Transforms/SimplifyCFG/no_speculative_loads_with_tsan.ll @@ -1,4 +1,4 @@ -; RUN: opt -simplifycfg -S %s | FileCheck %s +; RUN: opt -simplifycfg -simplifycfg-require-and-preserve-domtree=1 -S %s | FileCheck %s ; Make sure we don't speculate loads under ThreadSanitizer. @g = global i32 0, align 4 diff --git a/llvm/test/Transforms/SimplifyCFG/phi-to-select-constexpr-icmp.ll b/llvm/test/Transforms/SimplifyCFG/phi-to-select-constexpr-icmp.ll index cfc4150ecf10..20f192d3445f 100644 --- a/llvm/test/Transforms/SimplifyCFG/phi-to-select-constexpr-icmp.ll +++ b/llvm/test/Transforms/SimplifyCFG/phi-to-select-constexpr-icmp.ll @@ -1,5 +1,5 @@ ; NOTE: Assertions have been autogenerated by utils/update_test_checks.py -; RUN: opt -simplifycfg -S %s | FileCheck %s +; RUN: opt -simplifycfg -simplifycfg-require-and-preserve-domtree=1 -S %s | FileCheck %s @glob = internal constant [5 x i8*] zeroinitializer, align 16 diff --git a/llvm/test/Transforms/SimplifyCFG/preserve-branchweights-partial.ll b/llvm/test/Transforms/SimplifyCFG/preserve-branchweights-partial.ll index b2b384112af8..aa7a7a0fd042 100644 --- a/llvm/test/Transforms/SimplifyCFG/preserve-branchweights-partial.ll +++ b/llvm/test/Transforms/SimplifyCFG/preserve-branchweights-partial.ll @@ -1,8 +1,8 @@ -; RUN: opt -simplifycfg -S -o - < %s | FileCheck %s +; RUN: opt -simplifycfg -simplifycfg-require-and-preserve-domtree=1 -S -o - < %s | FileCheck %s ; This test case was written to trigger an incorrect assert statement in ; -simplifycfg. Thus we don't actually want to check the output, just that -; -simplifycfg ran successfully. Thus we only check that the function still +; -simplifycfg -simplifycfg-require-and-preserve-domtree=1 ran successfully. Thus we only check that the function still ; exists, and that it still calls foo(). ; ; NOTE: There are some obviously dead blocks and missing branch weight diff --git a/llvm/test/Transforms/SimplifyCFG/preserve-llvm-loop-metadata.ll b/llvm/test/Transforms/SimplifyCFG/preserve-llvm-loop-metadata.ll index 0615cd1fb3f2..c29f86fea495 100644 --- a/llvm/test/Transforms/SimplifyCFG/preserve-llvm-loop-metadata.ll +++ b/llvm/test/Transforms/SimplifyCFG/preserve-llvm-loop-metadata.ll @@ -1,4 +1,4 @@ -; RUN: opt -simplifycfg -keep-loops=false -S < %s | FileCheck %s +; RUN: opt -simplifycfg -simplifycfg-require-and-preserve-domtree=1 -keep-loops=false -S < %s | FileCheck %s ; RUN: opt -passes='simplify-cfg' -S < %s | FileCheck %s define void @test1(i32 %n) #0 { diff --git a/llvm/test/Transforms/SimplifyCFG/preserve-store-alignment.ll b/llvm/test/Transforms/SimplifyCFG/preserve-store-alignment.ll index 845e29cd62ea..7d25ed2c797f 100644 --- a/llvm/test/Transforms/SimplifyCFG/preserve-store-alignment.ll +++ b/llvm/test/Transforms/SimplifyCFG/preserve-store-alignment.ll @@ -1,5 +1,5 @@ ; NOTE: Assertions have been autogenerated by utils/update_test_checks.py -; RUN: opt -simplifycfg -simplifycfg-require-and-preserve-domtree=1 -S < %s | FileCheck %s +; RUN: opt -simplifycfg -S < %s | FileCheck %s %struct.Counters = type { i64, i64, i64, [8 x i8] } diff --git a/llvm/test/Transforms/SimplifyCFG/select-gep.ll b/llvm/test/Transforms/SimplifyCFG/select-gep.ll index 66808c92816b..0830d726f20c 100644 --- a/llvm/test/Transforms/SimplifyCFG/select-gep.ll +++ b/llvm/test/Transforms/SimplifyCFG/select-gep.ll @@ -1,5 +1,5 @@ ; NOTE: Assertions have been autogenerated by utils/update_test_checks.py -; RUN: opt -S -simplifycfg < %s | FileCheck %s +; RUN: opt -S -simplifycfg -simplifycfg-require-and-preserve-domtree=1 < %s | FileCheck %s %ST = type { i8, i8 } diff --git a/llvm/test/Transforms/SimplifyCFG/speculate-call.ll b/llvm/test/Transforms/SimplifyCFG/speculate-call.ll index 6e9398b6203c..11a88fa80308 100644 --- a/llvm/test/Transforms/SimplifyCFG/speculate-call.ll +++ b/llvm/test/Transforms/SimplifyCFG/speculate-call.ll @@ -1,4 +1,4 @@ -; RUN: opt -S -simplifycfg < %s | FileCheck %s +; RUN: opt -S -simplifycfg -simplifycfg-require-and-preserve-domtree=1 < %s | FileCheck %s ; CHECK-LABEL: @speculatable_attribute ; CHECK: select diff --git a/llvm/test/Transforms/SimplifyCFG/speculate-dbgvalue.ll b/llvm/test/Transforms/SimplifyCFG/speculate-dbgvalue.ll index 552bb42c83b5..8ade49d95ede 100644 --- a/llvm/test/Transforms/SimplifyCFG/speculate-dbgvalue.ll +++ b/llvm/test/Transforms/SimplifyCFG/speculate-dbgvalue.ll @@ -1,5 +1,5 @@ ; NOTE: Assertions have been autogenerated by utils/update_test_checks.py -; RUN: opt < %s -S -simplifycfg | FileCheck %s +; RUN: opt < %s -S -simplifycfg -simplifycfg-require-and-preserve-domtree=1 | FileCheck %s ; This test case was generated from speculate-dbgvalue.c: ; diff --git a/llvm/test/Transforms/SimplifyCFG/speculate-store.ll b/llvm/test/Transforms/SimplifyCFG/speculate-store.ll index 497e024e2489..ee8aa127de7d 100644 --- a/llvm/test/Transforms/SimplifyCFG/speculate-store.ll +++ b/llvm/test/Transforms/SimplifyCFG/speculate-store.ll @@ -1,4 +1,4 @@ -; RUN: opt -simplifycfg -S < %s | FileCheck %s +; RUN: opt -simplifycfg -simplifycfg-require-and-preserve-domtree=1 -S < %s | FileCheck %s define void @ifconvertstore(i32* %A, i32 %B, i32 %C, i32 %D) { ; CHECK-LABEL: @ifconvertstore( diff --git a/llvm/test/Transforms/SimplifyCFG/switch-to-select-multiple-edge-per-block-phi.ll b/llvm/test/Transforms/SimplifyCFG/switch-to-select-multiple-edge-per-block-phi.ll index bdc7017f4c73..fe69de4c3aa8 100644 --- a/llvm/test/Transforms/SimplifyCFG/switch-to-select-multiple-edge-per-block-phi.ll +++ b/llvm/test/Transforms/SimplifyCFG/switch-to-select-multiple-edge-per-block-phi.ll @@ -1,4 +1,4 @@ -; RUN: opt < %s -simplifycfg -S | FileCheck %s +; RUN: opt < %s -simplifycfg -simplifycfg-require-and-preserve-domtree=1 -S | FileCheck %s ; a, b; ; fn1() { diff --git a/llvm/test/Transforms/SimplifyCFG/switch_undef.ll b/llvm/test/Transforms/SimplifyCFG/switch_undef.ll index 83d18c924dc2..410dd8ce4c6a 100644 --- a/llvm/test/Transforms/SimplifyCFG/switch_undef.ll +++ b/llvm/test/Transforms/SimplifyCFG/switch_undef.ll @@ -1,5 +1,5 @@ ; NOTE: Assertions have been autogenerated by utils/update_test_checks.py -; RUN: opt %s -keep-loops=false -switch-to-lookup=true -simplifycfg -S | FileCheck %s +; RUN: opt %s -keep-loops=false -switch-to-lookup=true -simplifycfg -simplifycfg-require-and-preserve-domtree=1 -S | FileCheck %s ; RUN: opt %s -passes='simplify-cfg' -S | FileCheck %s define void @f6() #0 { diff --git a/llvm/test/Transforms/SimplifyCFG/two-entry-phi-return.ll b/llvm/test/Transforms/SimplifyCFG/two-entry-phi-return.ll index 1e9aa6b48f6b..af647508ee65 100644 --- a/llvm/test/Transforms/SimplifyCFG/two-entry-phi-return.ll +++ b/llvm/test/Transforms/SimplifyCFG/two-entry-phi-return.ll @@ -1,5 +1,5 @@ ; NOTE: Assertions have been autogenerated by utils/update_test_checks.py -; RUN: opt < %s -simplifycfg -S | FileCheck %s +; RUN: opt < %s -simplifycfg -simplifycfg-require-and-preserve-domtree=1 -S | FileCheck %s define i1 @qux(i8* %m, i8* %n, i8* %o, i8* %p) nounwind { ; CHECK-LABEL: @qux( diff --git a/llvm/test/Transforms/SimplifyCFG/unreachable-cleanuppad.ll b/llvm/test/Transforms/SimplifyCFG/unreachable-cleanuppad.ll index 9198b2a6ea4a..90e2aefbf4d0 100644 --- a/llvm/test/Transforms/SimplifyCFG/unreachable-cleanuppad.ll +++ b/llvm/test/Transforms/SimplifyCFG/unreachable-cleanuppad.ll @@ -1,4 +1,4 @@ -; RUN: opt -simplifycfg -S < %s | FileCheck %s +; RUN: opt -simplifycfg -simplifycfg-require-and-preserve-domtree=1 -S < %s | FileCheck %s target datalayout = "e-m:x-p:32:32-i64:64-f80:32-n8:16:32-a:0:32-S32" target triple = "i686-pc-win32" -- 2.34.1