[llvm] aa2009f - [NFCI][SimplifyCFG] Mark all the SimplifyCFG tests that already don't invalidate DomTree as such

Roman Lebedev via llvm-commits llvm-commits at lists.llvm.org
Wed Dec 16 14:04:20 PST 2020


Author: Roman Lebedev
Date: 2020-12-17T01:03:49+03:00
New Revision: aa2009fe786b54f1f665603c9c1eef738ac7df7b

URL: https://github.com/llvm/llvm-project/commit/aa2009fe786b54f1f665603c9c1eef738ac7df7b
DIFF: https://github.com/llvm/llvm-project/commit/aa2009fe786b54f1f665603c9c1eef738ac7df7b.diff

LOG: [NFCI][SimplifyCFG] Mark all the SimplifyCFG tests that already don't invalidate DomTree as such

First step after e1133179587dd895962a2fe4d6eb0cb1e63b5ee2,
in these tests, DomTree is valid afterwards, so mark them as such,
so that they don't regress.

In further steps, SimplifyCFG transforms shall taught to preserve DomTree,
in as small steps as possible.

Added: 
    

Modified: 
    llvm/test/Transforms/IndVarSimplify/tripcount_infinite.ll
    llvm/test/Transforms/JumpThreading/and-and-cond.ll
    llvm/test/Transforms/JumpThreading/and-cond.ll
    llvm/test/Transforms/LoopIdiom/scev-invalidation_topmostloop.ll
    llvm/test/Transforms/LoopUnroll/2012-04-09-unroll-indirectbr.ll
    llvm/test/Transforms/LoopVectorize/AMDGPU/divergent-runtime-check.ll
    llvm/test/Transforms/SimplifyCFG/2003-08-05-InvokeCrash.ll
    llvm/test/Transforms/SimplifyCFG/2003-08-17-BranchFold.ll
    llvm/test/Transforms/SimplifyCFG/2003-08-17-FoldSwitch-dbg.ll
    llvm/test/Transforms/SimplifyCFG/2005-12-03-IncorrectPHIFold.ll
    llvm/test/Transforms/SimplifyCFG/2006-10-19-UncondDiv.ll
    llvm/test/Transforms/SimplifyCFG/2008-01-02-hoist-fp-add.ll
    llvm/test/Transforms/SimplifyCFG/AArch64/prefer-fma.ll
    llvm/test/Transforms/SimplifyCFG/EmptyBlockMerge.ll
    llvm/test/Transforms/SimplifyCFG/PhiNoEliminate.ll
    llvm/test/Transforms/SimplifyCFG/PowerPC/prefer-fma.ll
    llvm/test/Transforms/SimplifyCFG/PowerPC/prefer-load-i32.ll
    llvm/test/Transforms/SimplifyCFG/SPARC/switch_to_lookup_table.ll
    llvm/test/Transforms/SimplifyCFG/X86/combine-parallel-mem-md.ll
    llvm/test/Transforms/SimplifyCFG/X86/merge-cond-stores-cost.ll
    llvm/test/Transforms/SimplifyCFG/assume.ll
    llvm/test/Transforms/SimplifyCFG/attr-noduplicate.ll
    llvm/test/Transforms/SimplifyCFG/branch-fold-three.ll
    llvm/test/Transforms/SimplifyCFG/callbr-destinations.ll
    llvm/test/Transforms/SimplifyCFG/convergent.ll
    llvm/test/Transforms/SimplifyCFG/div-rem-pairs.ll
    llvm/test/Transforms/SimplifyCFG/duplicate-phis.ll
    llvm/test/Transforms/SimplifyCFG/gepcost.ll
    llvm/test/Transforms/SimplifyCFG/hoist-dbgvalue.ll
    llvm/test/Transforms/SimplifyCFG/inline-asm-sink.ll
    llvm/test/Transforms/SimplifyCFG/lifetime.ll
    llvm/test/Transforms/SimplifyCFG/merge-default.ll
    llvm/test/Transforms/SimplifyCFG/noreturn-call.ll
    llvm/test/Transforms/SimplifyCFG/pr33605.ll
    llvm/test/Transforms/SimplifyCFG/pr35774.ll
    llvm/test/Transforms/SimplifyCFG/preserve-load-metadata-2.ll
    llvm/test/Transforms/SimplifyCFG/preserve-load-metadata-3.ll
    llvm/test/Transforms/SimplifyCFG/preserve-load-metadata.ll
    llvm/test/Transforms/SimplifyCFG/preserve-make-implicit-on-switch-to-br.ll
    llvm/test/Transforms/SimplifyCFG/seh-nounwind.ll
    llvm/test/Transforms/SimplifyCFG/statepoint-invoke-unwind.ll
    llvm/test/Transforms/SimplifyCFG/suppress-zero-branch-weights.ll
    llvm/test/Transforms/SimplifyCFG/trap-debugloc.ll
    llvm/test/Transforms/SimplifyCFG/trap-no-null-opt-debugloc.ll
    llvm/test/Transforms/SimplifyCFG/trapping-load-unreachable.ll
    llvm/test/Transforms/SimplifyCFG/two-entry-phi-fold-crash.ll
    llvm/test/Transforms/SimplifyCFG/volatile-phioper.ll

Removed: 
    


################################################################################
diff  --git a/llvm/test/Transforms/IndVarSimplify/tripcount_infinite.ll b/llvm/test/Transforms/IndVarSimplify/tripcount_infinite.ll
index 658598d3b7e4..75d3de03e8ed 100644
--- a/llvm/test/Transforms/IndVarSimplify/tripcount_infinite.ll
+++ b/llvm/test/Transforms/IndVarSimplify/tripcount_infinite.ll
@@ -1,7 +1,7 @@
-; These tests have an infinite trip count.  We obviously shouldn't remove the 
+; These tests have an infinite trip count.  We obviously shouldn't remove the
 ; loops!  :)
 ;
-; RUN: opt < %s -indvars -adce -simplifycfg -S | FileCheck %s
+; RUN: opt < %s -indvars -adce -simplifycfg -simplifycfg-require-and-preserve-domtree=1 -S | FileCheck %s
 
 ;; test for (i = 1; i != 100; i += 2)
 define i32 @infinite_linear() {

diff  --git a/llvm/test/Transforms/JumpThreading/and-and-cond.ll b/llvm/test/Transforms/JumpThreading/and-and-cond.ll
index 765d940cc7c3..7813ba43c331 100644
--- a/llvm/test/Transforms/JumpThreading/and-and-cond.ll
+++ b/llvm/test/Transforms/JumpThreading/and-and-cond.ll
@@ -1,4 +1,4 @@
-; RUN: opt < %s -jump-threading -mem2reg -instcombine -simplifycfg  -S | FileCheck %s
+; RUN: opt < %s -jump-threading -mem2reg -instcombine -simplifycfg -simplifycfg-require-and-preserve-domtree=1  -S | FileCheck %s
 
 declare i32 @f1()
 declare i32 @f2()

diff  --git a/llvm/test/Transforms/JumpThreading/and-cond.ll b/llvm/test/Transforms/JumpThreading/and-cond.ll
index 0159bb3bb761..b97aab88395e 100644
--- a/llvm/test/Transforms/JumpThreading/and-cond.ll
+++ b/llvm/test/Transforms/JumpThreading/and-cond.ll
@@ -1,4 +1,4 @@
-; RUN: opt < %s -jump-threading -mem2reg -instcombine -simplifycfg  -S | FileCheck %s
+; RUN: opt < %s -jump-threading -mem2reg -instcombine -simplifycfg -simplifycfg-require-and-preserve-domtree=1  -S | FileCheck %s
 
 declare i32 @f1()
 declare i32 @f2()

diff  --git a/llvm/test/Transforms/LoopIdiom/scev-invalidation_topmostloop.ll b/llvm/test/Transforms/LoopIdiom/scev-invalidation_topmostloop.ll
index 97ebf9bd1681..718682b4edfe 100644
--- a/llvm/test/Transforms/LoopIdiom/scev-invalidation_topmostloop.ll
+++ b/llvm/test/Transforms/LoopIdiom/scev-invalidation_topmostloop.ll
@@ -1,4 +1,4 @@
-; RUN: opt -S -indvars -loop-idiom -verify -loop-simplifycfg -loop-idiom < %s | FileCheck %s
+; RUN: opt -S -indvars -loop-idiom -verify -loop-simplifycfg -simplifycfg-require-and-preserve-domtree=1 -loop-idiom < %s | FileCheck %s
 
 target triple = "x86_64-unknown-linux-gnu"
 

diff  --git a/llvm/test/Transforms/LoopUnroll/2012-04-09-unroll-indirectbr.ll b/llvm/test/Transforms/LoopUnroll/2012-04-09-unroll-indirectbr.ll
index 8946a23c200f..2ccf4cf5ec17 100644
--- a/llvm/test/Transforms/LoopUnroll/2012-04-09-unroll-indirectbr.ll
+++ b/llvm/test/Transforms/LoopUnroll/2012-04-09-unroll-indirectbr.ll
@@ -1,4 +1,4 @@
-; RUN: opt < %s -S -loop-unroll -simplifycfg | FileCheck %s
+; RUN: opt < %s -S -loop-unroll -simplifycfg -simplifycfg-require-and-preserve-domtree=1 | FileCheck %s
 ; PR12513: Loop unrolling breaks with indirect branches.
 ; If loop unrolling attempts to transform this loop, it replaces the
 ; indirectbr successors. SimplifyCFG then considers them to be unreachable.

diff  --git a/llvm/test/Transforms/LoopVectorize/AMDGPU/divergent-runtime-check.ll b/llvm/test/Transforms/LoopVectorize/AMDGPU/divergent-runtime-check.ll
index be9cf85e47d4..0ea9a70e2d9d 100644
--- a/llvm/test/Transforms/LoopVectorize/AMDGPU/divergent-runtime-check.ll
+++ b/llvm/test/Transforms/LoopVectorize/AMDGPU/divergent-runtime-check.ll
@@ -1,4 +1,4 @@
-; RUN: opt -S -mtriple=amdgcn-unknown-amdhsa -mcpu=gfx900 -loop-vectorize -simplifycfg < %s | FileCheck -check-prefixes=GCN %s
+; RUN: opt -S -mtriple=amdgcn-unknown-amdhsa -mcpu=gfx900 -loop-vectorize -simplifycfg -simplifycfg-require-and-preserve-domtree=1 < %s | FileCheck -check-prefixes=GCN %s
 ; RUN: opt -S -mtriple=amdgcn-unknown-amdhsa -mcpu=gfx900 -loop-vectorize -pass-remarks-analysis='loop-vectorize' < %s 2>&1 | FileCheck -check-prefixes=REMARK %s
 
 ; GCN-LABEL: @runtime_check_divergent_target(

diff  --git a/llvm/test/Transforms/SimplifyCFG/2003-08-05-InvokeCrash.ll b/llvm/test/Transforms/SimplifyCFG/2003-08-05-InvokeCrash.ll
index fe3a603a0426..e609e4177a31 100644
--- a/llvm/test/Transforms/SimplifyCFG/2003-08-05-InvokeCrash.ll
+++ b/llvm/test/Transforms/SimplifyCFG/2003-08-05-InvokeCrash.ll
@@ -1,6 +1,6 @@
 ; Do not remove the invoke!
 ;
-; RUN: opt < %s -simplifycfg -disable-output
+; RUN: opt < %s -simplifycfg -simplifycfg-require-and-preserve-domtree=1 -disable-output
 
 define i32 @test() personality i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*) {
 	%A = invoke i32 @test( )

diff  --git a/llvm/test/Transforms/SimplifyCFG/2003-08-17-BranchFold.ll b/llvm/test/Transforms/SimplifyCFG/2003-08-17-BranchFold.ll
index f1d2dbe0c128..fa146701dd7d 100644
--- a/llvm/test/Transforms/SimplifyCFG/2003-08-17-BranchFold.ll
+++ b/llvm/test/Transforms/SimplifyCFG/2003-08-17-BranchFold.ll
@@ -1,7 +1,7 @@
 ; This test checks to make sure that 'br X, Dest, Dest' is folded into
 ; 'br Dest'
 
-; RUN: opt < %s -simplifycfg -S | FileCheck %s
+; RUN: opt < %s -simplifycfg -simplifycfg-require-and-preserve-domtree=1 -S | FileCheck %s
 
 declare void @noop()
 

diff  --git a/llvm/test/Transforms/SimplifyCFG/2003-08-17-FoldSwitch-dbg.ll b/llvm/test/Transforms/SimplifyCFG/2003-08-17-FoldSwitch-dbg.ll
index 0626ea178e5c..48dba49e4557 100644
--- a/llvm/test/Transforms/SimplifyCFG/2003-08-17-FoldSwitch-dbg.ll
+++ b/llvm/test/Transforms/SimplifyCFG/2003-08-17-FoldSwitch-dbg.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-NOT: switch
         %llvm.dbg.anchor.type = type { i32, i32 }

diff  --git a/llvm/test/Transforms/SimplifyCFG/2005-12-03-IncorrectPHIFold.ll b/llvm/test/Transforms/SimplifyCFG/2005-12-03-IncorrectPHIFold.ll
index d31fd52ac362..1a853abb3efe 100644
--- a/llvm/test/Transforms/SimplifyCFG/2005-12-03-IncorrectPHIFold.ll
+++ b/llvm/test/Transforms/SimplifyCFG/2005-12-03-IncorrectPHIFold.ll
@@ -1,6 +1,6 @@
 ; Make sure this doesn't turn into an infinite loop
 
-; RUN: opt < %s -simplifycfg -instsimplify -simplifycfg | llvm-dis | FileCheck %s
+; RUN: opt < %s -simplifycfg -simplifycfg-require-and-preserve-domtree=1 -instsimplify -simplifycfg -simplifycfg-require-and-preserve-domtree=1 | llvm-dis | FileCheck %s
 
 %struct.anon = type { i32, i32, i32, i32, [1024 x i8] }
 @_zero_ = external global %struct.anon*		; <%struct.anon**> [#uses=2]

diff  --git a/llvm/test/Transforms/SimplifyCFG/2006-10-19-UncondDiv.ll b/llvm/test/Transforms/SimplifyCFG/2006-10-19-UncondDiv.ll
index 8f21b9bab9b6..bf7f0e61e3c8 100644
--- a/llvm/test/Transforms/SimplifyCFG/2006-10-19-UncondDiv.ll
+++ b/llvm/test/Transforms/SimplifyCFG/2006-10-19-UncondDiv.ll
@@ -1,5 +1,5 @@
 ; PR957
-; RUN: opt < %s -simplifycfg -S | FileCheck %s
+; RUN: opt < %s -simplifycfg -simplifycfg-require-and-preserve-domtree=1 -S | FileCheck %s
 
 ; CHECK-NOT: select
 

diff  --git a/llvm/test/Transforms/SimplifyCFG/2008-01-02-hoist-fp-add.ll b/llvm/test/Transforms/SimplifyCFG/2008-01-02-hoist-fp-add.ll
index 7625d935ab3d..e55fba3a928e 100644
--- a/llvm/test/Transforms/SimplifyCFG/2008-01-02-hoist-fp-add.ll
+++ b/llvm/test/Transforms/SimplifyCFG/2008-01-02-hoist-fp-add.ll
@@ -1,5 +1,5 @@
 ; The phi should not be eliminated in this case, because the divide op could trap.
-; RUN: opt < %s -simplifycfg -S | FileCheck %s
+; RUN: opt < %s -simplifycfg -simplifycfg-require-and-preserve-domtree=1 -S | FileCheck %s
 
 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 = "i686-apple-darwin8"

diff  --git a/llvm/test/Transforms/SimplifyCFG/AArch64/prefer-fma.ll b/llvm/test/Transforms/SimplifyCFG/AArch64/prefer-fma.ll
index f9a571418b32..7ffa7053e396 100644
--- a/llvm/test/Transforms/SimplifyCFG/AArch64/prefer-fma.ll
+++ b/llvm/test/Transforms/SimplifyCFG/AArch64/prefer-fma.ll
@@ -1,4 +1,4 @@
-; RUN: opt < %s -mtriple=aarch64-linux-gnu -simplifycfg -hoist-common-insts=true -enable-unsafe-fp-math -S >%t
+; RUN: opt < %s -mtriple=aarch64-linux-gnu -simplifycfg -simplifycfg-require-and-preserve-domtree=1 -hoist-common-insts=true -enable-unsafe-fp-math -S >%t
 ; RUN: FileCheck %s < %t
 ; ModuleID = 't.cc'
 

diff  --git a/llvm/test/Transforms/SimplifyCFG/EmptyBlockMerge.ll b/llvm/test/Transforms/SimplifyCFG/EmptyBlockMerge.ll
index 32a0202364d9..5c31e0186731 100644
--- a/llvm/test/Transforms/SimplifyCFG/EmptyBlockMerge.ll
+++ b/llvm/test/Transforms/SimplifyCFG/EmptyBlockMerge.ll
@@ -1,6 +1,6 @@
 ; Basic block #2 should not be merged into BB #3!
 ;
-; RUN: opt < %s -simplifycfg -S | FileCheck %s
+; RUN: opt < %s -simplifycfg -simplifycfg-require-and-preserve-domtree=1 -S | FileCheck %s
 
 declare void @foo()
 

diff  --git a/llvm/test/Transforms/SimplifyCFG/PhiNoEliminate.ll b/llvm/test/Transforms/SimplifyCFG/PhiNoEliminate.ll
index daf1b69e0520..425acfba39ce 100644
--- a/llvm/test/Transforms/SimplifyCFG/PhiNoEliminate.ll
+++ b/llvm/test/Transforms/SimplifyCFG/PhiNoEliminate.ll
@@ -1,4 +1,4 @@
-; RUN: opt < %s -simplifycfg -S | \
+; RUN: opt < %s -simplifycfg -simplifycfg-require-and-preserve-domtree=1 -S | \
 ; RUN:   not grep select
 
 ;; The PHI node in this example should not be turned into a select, as we are

diff  --git a/llvm/test/Transforms/SimplifyCFG/PowerPC/prefer-fma.ll b/llvm/test/Transforms/SimplifyCFG/PowerPC/prefer-fma.ll
index 7a6ad85dbd6b..6a2e88d2eaf7 100644
--- a/llvm/test/Transforms/SimplifyCFG/PowerPC/prefer-fma.ll
+++ b/llvm/test/Transforms/SimplifyCFG/PowerPC/prefer-fma.ll
@@ -1,5 +1,5 @@
 ; NOTE: Assertions have been autogenerated by utils/update_test_checks.py
-; RUN: opt < %s -mtriple=powerpc64le-unknown-linux-gnu -simplifycfg -hoist-common-insts=true -enable-unsafe-fp-math -S | \
+; RUN: opt < %s -mtriple=powerpc64le-unknown-linux-gnu -simplifycfg -simplifycfg-require-and-preserve-domtree=1 -hoist-common-insts=true -enable-unsafe-fp-math -S | \
 ; RUN: FileCheck %s
 
 ; This case is copied from test/Transforms/SimplifyCFG/AArch64/

diff  --git a/llvm/test/Transforms/SimplifyCFG/PowerPC/prefer-load-i32.ll b/llvm/test/Transforms/SimplifyCFG/PowerPC/prefer-load-i32.ll
index d85f532aa5c4..7e10b1fb98e6 100644
--- a/llvm/test/Transforms/SimplifyCFG/PowerPC/prefer-load-i32.ll
+++ b/llvm/test/Transforms/SimplifyCFG/PowerPC/prefer-load-i32.ll
@@ -1,4 +1,4 @@
-; RUN: opt < %s -mtriple=powerpc64le-unknown-linux-gnu -simplifycfg -hoist-common-insts=true -S | FileCheck %s
+; RUN: opt < %s -mtriple=powerpc64le-unknown-linux-gnu -simplifycfg -simplifycfg-require-and-preserve-domtree=1 -hoist-common-insts=true -S | FileCheck %s
 
 define float @foo(float* %src, float* %dest, i32 signext %count, i32 signext %cond) {
 ; CHECK-LABEL: @foo(

diff  --git a/llvm/test/Transforms/SimplifyCFG/SPARC/switch_to_lookup_table.ll b/llvm/test/Transforms/SimplifyCFG/SPARC/switch_to_lookup_table.ll
index bb48c80268aa..50472cada7cc 100644
--- a/llvm/test/Transforms/SimplifyCFG/SPARC/switch_to_lookup_table.ll
+++ b/llvm/test/Transforms/SimplifyCFG/SPARC/switch_to_lookup_table.ll
@@ -1,4 +1,4 @@
-; RUN: opt < %s -simplifycfg -S -mtriple=sparc-unknown-unknown | FileCheck %s
+; RUN: opt < %s -simplifycfg -simplifycfg-require-and-preserve-domtree=1 -S -mtriple=sparc-unknown-unknown | FileCheck %s
 
 ; Check that switches are not turned into lookup tables, as this is not
 ; considered profitable on the target.

diff  --git a/llvm/test/Transforms/SimplifyCFG/X86/combine-parallel-mem-md.ll b/llvm/test/Transforms/SimplifyCFG/X86/combine-parallel-mem-md.ll
index d3ff927825f7..019e757ab222 100644
--- a/llvm/test/Transforms/SimplifyCFG/X86/combine-parallel-mem-md.ll
+++ b/llvm/test/Transforms/SimplifyCFG/X86/combine-parallel-mem-md.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:e-i64:64-f80:128-n8:16:32:64-S128"
 target triple = "x86_64-unknown-linux-gnu"
 

diff  --git a/llvm/test/Transforms/SimplifyCFG/X86/merge-cond-stores-cost.ll b/llvm/test/Transforms/SimplifyCFG/X86/merge-cond-stores-cost.ll
index 4a7f7d791848..9813ea652005 100644
--- a/llvm/test/Transforms/SimplifyCFG/X86/merge-cond-stores-cost.ll
+++ b/llvm/test/Transforms/SimplifyCFG/X86/merge-cond-stores-cost.ll
@@ -1,5 +1,5 @@
 ; NOTE: Assertions have been autogenerated by utils/update_test_checks.py
-; RUN: opt -simplifycfg -mtriple=x86_64-unknown-unknown < %s -simplifycfg-merge-cond-stores=true -simplifycfg-merge-cond-stores-aggressively=false -phi-node-folding-threshold=2 -S | FileCheck %s
+; RUN: opt -simplifycfg -simplifycfg-require-and-preserve-domtree=1 -mtriple=x86_64-unknown-unknown < %s -simplifycfg-merge-cond-stores=true -simplifycfg-merge-cond-stores-aggressively=false -phi-node-folding-threshold=2 -S | FileCheck %s
 
 define void @test_costly(i32* %p, i32 %a, i32 %b, i32 %c, i32 %d) {
 ; CHECK-LABEL: @test_costly(

diff  --git a/llvm/test/Transforms/SimplifyCFG/assume.ll b/llvm/test/Transforms/SimplifyCFG/assume.ll
index 1d1b96a58edf..ef3e5376f395 100644
--- a/llvm/test/Transforms/SimplifyCFG/assume.ll
+++ b/llvm/test/Transforms/SimplifyCFG/assume.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 @test1() {
         call void @llvm.assume(i1 0)

diff  --git a/llvm/test/Transforms/SimplifyCFG/attr-noduplicate.ll b/llvm/test/Transforms/SimplifyCFG/attr-noduplicate.ll
index 5f8456ba4054..85a583d87e8d 100644
--- a/llvm/test/Transforms/SimplifyCFG/attr-noduplicate.ll
+++ b/llvm/test/Transforms/SimplifyCFG/attr-noduplicate.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
 
 ; This test checks that the SimplifyCFG pass won't duplicate a call to a
 ; function marked noduplicate.

diff  --git a/llvm/test/Transforms/SimplifyCFG/branch-fold-three.ll b/llvm/test/Transforms/SimplifyCFG/branch-fold-three.ll
index 953749bfb16a..d9e6f413e382 100644
--- a/llvm/test/Transforms/SimplifyCFG/branch-fold-three.ll
+++ b/llvm/test/Transforms/SimplifyCFG/branch-fold-three.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
 
 ; s >= t, s != t, s <= t
 define void @foo1(i32 %s, i32 %t) {

diff  --git a/llvm/test/Transforms/SimplifyCFG/callbr-destinations.ll b/llvm/test/Transforms/SimplifyCFG/callbr-destinations.ll
index 18210e5e0b06..3ab36e66e8ca 100644
--- a/llvm/test/Transforms/SimplifyCFG/callbr-destinations.ll
+++ b/llvm/test/Transforms/SimplifyCFG/callbr-destinations.ll
@@ -1,4 +1,4 @@
-; RUN: opt < %s -simplifycfg -disable-output
+; RUN: opt < %s -simplifycfg -simplifycfg-require-and-preserve-domtree=1 -disable-output
 ;
 ; Test that SimplifyCFG does not cause CallBr instructions to have duplicate
 ; destinations, which will cause the verifier to assert.

diff  --git a/llvm/test/Transforms/SimplifyCFG/convergent.ll b/llvm/test/Transforms/SimplifyCFG/convergent.ll
index 1860f457da6c..07464a7b9d0e 100644
--- a/llvm/test/Transforms/SimplifyCFG/convergent.ll
+++ b/llvm/test/Transforms/SimplifyCFG/convergent.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
 ; RUN: opt -S -passes=simplify-cfg < %s | FileCheck %s
 
 declare void @foo() convergent

diff  --git a/llvm/test/Transforms/SimplifyCFG/div-rem-pairs.ll b/llvm/test/Transforms/SimplifyCFG/div-rem-pairs.ll
index 4543d726930e..621151c8a05f 100644
--- a/llvm/test/Transforms/SimplifyCFG/div-rem-pairs.ll
+++ b/llvm/test/Transforms/SimplifyCFG/div-rem-pairs.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
 
 ; We could hoist the div/rem in these tests because it's safe to do so.
 ; PR31028 - https://bugs.llvm.org/show_bug.cgi?id=31028

diff  --git a/llvm/test/Transforms/SimplifyCFG/duplicate-phis.ll b/llvm/test/Transforms/SimplifyCFG/duplicate-phis.ll
index 4788406fc0f3..d3b76fd3ea05 100644
--- a/llvm/test/Transforms/SimplifyCFG/duplicate-phis.ll
+++ b/llvm/test/Transforms/SimplifyCFG/duplicate-phis.ll
@@ -1,4 +1,4 @@
-; RUN: opt < %s -instcombine -simplifycfg -S | grep " = phi " | count 1
+; RUN: opt < %s -instcombine -simplifycfg -simplifycfg-require-and-preserve-domtree=1 -S | grep " = phi " | count 1
 
 ; instcombine should sort the PHI operands so that simplifycfg can see the
 ; duplicate and remove it.

diff  --git a/llvm/test/Transforms/SimplifyCFG/gepcost.ll b/llvm/test/Transforms/SimplifyCFG/gepcost.ll
index 10751f747e33..9d68d8992682 100644
--- a/llvm/test/Transforms/SimplifyCFG/gepcost.ll
+++ b/llvm/test/Transforms/SimplifyCFG/gepcost.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
 
 target datalayout = "e-m:e-p:32:32-i64:64-v128:64:128-a:0:32-n32-S64"
 target triple = "thumbv7m-none--eabi"

diff  --git a/llvm/test/Transforms/SimplifyCFG/hoist-dbgvalue.ll b/llvm/test/Transforms/SimplifyCFG/hoist-dbgvalue.ll
index 205e384a6909..e7c8047e68ad 100644
--- a/llvm/test/Transforms/SimplifyCFG/hoist-dbgvalue.ll
+++ b/llvm/test/Transforms/SimplifyCFG/hoist-dbgvalue.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 i32 @foo(i32 %i) nounwind ssp !dbg !0 {
   call void @llvm.dbg.value(metadata i32 %i, metadata !6, metadata !DIExpression()), !dbg !7

diff  --git a/llvm/test/Transforms/SimplifyCFG/inline-asm-sink.ll b/llvm/test/Transforms/SimplifyCFG/inline-asm-sink.ll
index da281d6c4a7d..8200b813c75b 100644
--- a/llvm/test/Transforms/SimplifyCFG/inline-asm-sink.ll
+++ b/llvm/test/Transforms/SimplifyCFG/inline-asm-sink.ll
@@ -1,4 +1,4 @@
-; RUN: opt < %s -mem2reg -simplifycfg -S | FileCheck -enable-var-scope %s
+; RUN: opt < %s -mem2reg -simplifycfg -simplifycfg-require-and-preserve-domtree=1 -S | FileCheck -enable-var-scope %s
 
 define i32 @test(i32 %x) {
 ; CHECK-LABEL: @test

diff  --git a/llvm/test/Transforms/SimplifyCFG/lifetime.ll b/llvm/test/Transforms/SimplifyCFG/lifetime.ll
index 270fe4d54422..915ba859c058 100644
--- a/llvm/test/Transforms/SimplifyCFG/lifetime.ll
+++ b/llvm/test/Transforms/SimplifyCFG/lifetime.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
 
 ; Test that a lifetime intrinsic isn't removed because that would change semantics
 

diff  --git a/llvm/test/Transforms/SimplifyCFG/merge-default.ll b/llvm/test/Transforms/SimplifyCFG/merge-default.ll
index 93b64d708807..c503f374a08a 100644
--- a/llvm/test/Transforms/SimplifyCFG/merge-default.ll
+++ b/llvm/test/Transforms/SimplifyCFG/merge-default.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:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
 target triple = "x86_64-unknown-linux-gnu"

diff  --git a/llvm/test/Transforms/SimplifyCFG/noreturn-call.ll b/llvm/test/Transforms/SimplifyCFG/noreturn-call.ll
index 88d4f85713bc..f891fb349a6f 100644
--- a/llvm/test/Transforms/SimplifyCFG/noreturn-call.ll
+++ b/llvm/test/Transforms/SimplifyCFG/noreturn-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
 ; PR1796
 
 declare void @Finisher(i32) noreturn

diff  --git a/llvm/test/Transforms/SimplifyCFG/pr33605.ll b/llvm/test/Transforms/SimplifyCFG/pr33605.ll
index d4ed559d4afd..22da05eebf7c 100644
--- a/llvm/test/Transforms/SimplifyCFG/pr33605.ll
+++ b/llvm/test/Transforms/SimplifyCFG/pr33605.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
 
 ; Skip simplifying unconditional branches from empty blocks in simplifyCFG,
 ; when it can destroy canonical loop structure.

diff  --git a/llvm/test/Transforms/SimplifyCFG/pr35774.ll b/llvm/test/Transforms/SimplifyCFG/pr35774.ll
index 149252085d51..d91af1f9d6ef 100644
--- a/llvm/test/Transforms/SimplifyCFG/pr35774.ll
+++ b/llvm/test/Transforms/SimplifyCFG/pr35774.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
 
 %foo = type { i32 (%foo)*, i32 }
 

diff  --git a/llvm/test/Transforms/SimplifyCFG/preserve-load-metadata-2.ll b/llvm/test/Transforms/SimplifyCFG/preserve-load-metadata-2.ll
index bb3216e5c67f..6b94ba548bde 100644
--- a/llvm/test/Transforms/SimplifyCFG/preserve-load-metadata-2.ll
+++ b/llvm/test/Transforms/SimplifyCFG/preserve-load-metadata-2.ll
@@ -1,4 +1,4 @@
-; RUN: opt < %s -simplifycfg -hoist-common-insts=true -S | FileCheck %s
+; RUN: opt < %s -simplifycfg -simplifycfg-require-and-preserve-domtree=1 -hoist-common-insts=true -S | FileCheck %s
 
 declare void @bar(i32*)
 declare void @baz(i32*)

diff  --git a/llvm/test/Transforms/SimplifyCFG/preserve-load-metadata-3.ll b/llvm/test/Transforms/SimplifyCFG/preserve-load-metadata-3.ll
index 2a80e980c8f3..0b51af91d787 100644
--- a/llvm/test/Transforms/SimplifyCFG/preserve-load-metadata-3.ll
+++ b/llvm/test/Transforms/SimplifyCFG/preserve-load-metadata-3.ll
@@ -1,4 +1,4 @@
-; RUN: opt < %s -simplifycfg -hoist-common-insts=true -S | FileCheck %s
+; RUN: opt < %s -simplifycfg -simplifycfg-require-and-preserve-domtree=1 -hoist-common-insts=true -S | FileCheck %s
 
 declare void @bar(i32*)
 declare void @baz(i32*)

diff  --git a/llvm/test/Transforms/SimplifyCFG/preserve-load-metadata.ll b/llvm/test/Transforms/SimplifyCFG/preserve-load-metadata.ll
index 3e87651e7e14..852446447ad8 100644
--- a/llvm/test/Transforms/SimplifyCFG/preserve-load-metadata.ll
+++ b/llvm/test/Transforms/SimplifyCFG/preserve-load-metadata.ll
@@ -1,4 +1,4 @@
-; RUN: opt < %s -simplifycfg -hoist-common-insts=true -S | FileCheck %s
+; RUN: opt < %s -simplifycfg -simplifycfg-require-and-preserve-domtree=1 -hoist-common-insts=true -S | FileCheck %s
 
 declare void @bar(i32*)
 declare void @baz(i32*)

diff  --git a/llvm/test/Transforms/SimplifyCFG/preserve-make-implicit-on-switch-to-br.ll b/llvm/test/Transforms/SimplifyCFG/preserve-make-implicit-on-switch-to-br.ll
index a67daf9847ee..35e85687c632 100644
--- a/llvm/test/Transforms/SimplifyCFG/preserve-make-implicit-on-switch-to-br.ll
+++ b/llvm/test/Transforms/SimplifyCFG/preserve-make-implicit-on-switch-to-br.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
 
 ; ConstantFoldTerminator function can convert SwitchInst with one case (and default) to
 ; a conditional BranchInst. This test checks the converted BranchInst preserve the

diff  --git a/llvm/test/Transforms/SimplifyCFG/seh-nounwind.ll b/llvm/test/Transforms/SimplifyCFG/seh-nounwind.ll
index c380c6ce2ce9..6960183a4716 100644
--- a/llvm/test/Transforms/SimplifyCFG/seh-nounwind.ll
+++ b/llvm/test/Transforms/SimplifyCFG/seh-nounwind.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
 
 ; Don't remove invokes of nounwind functions if the personality handles async
 ; exceptions. The @div function in this test can fault, even though it can't

diff  --git a/llvm/test/Transforms/SimplifyCFG/statepoint-invoke-unwind.ll b/llvm/test/Transforms/SimplifyCFG/statepoint-invoke-unwind.ll
index 53daa8292da7..37f5b7763a67 100644
--- a/llvm/test/Transforms/SimplifyCFG/statepoint-invoke-unwind.ll
+++ b/llvm/test/Transforms/SimplifyCFG/statepoint-invoke-unwind.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
 ; Test that statepoint intrinsic is marked with Throwable attribute and it is
 ; not optimized into call
 

diff  --git a/llvm/test/Transforms/SimplifyCFG/suppress-zero-branch-weights.ll b/llvm/test/Transforms/SimplifyCFG/suppress-zero-branch-weights.ll
index b4f546ede7e1..e8d5e11d0026 100644
--- a/llvm/test/Transforms/SimplifyCFG/suppress-zero-branch-weights.ll
+++ b/llvm/test/Transforms/SimplifyCFG/suppress-zero-branch-weights.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
 
 ; We're sign extending an 8-bit value.
 ; The switch condition must be in the range [-128, 127], so any cases outside of that range must be dead.

diff  --git a/llvm/test/Transforms/SimplifyCFG/trap-debugloc.ll b/llvm/test/Transforms/SimplifyCFG/trap-debugloc.ll
index a912dc561a4f..f17183d41da7 100644
--- a/llvm/test/Transforms/SimplifyCFG/trap-debugloc.ll
+++ b/llvm/test/Transforms/SimplifyCFG/trap-debugloc.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
 ; Radar 9342286
 ; Assign DebugLoc to trap instruction.
 define void @foo() nounwind ssp !dbg !0 {

diff  --git a/llvm/test/Transforms/SimplifyCFG/trap-no-null-opt-debugloc.ll b/llvm/test/Transforms/SimplifyCFG/trap-no-null-opt-debugloc.ll
index 4cd5d2f6bfcb..b4a484cf9cfc 100644
--- a/llvm/test/Transforms/SimplifyCFG/trap-no-null-opt-debugloc.ll
+++ b/llvm/test/Transforms/SimplifyCFG/trap-no-null-opt-debugloc.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
 define void @foo() nounwind ssp #0 !dbg !0 {
 ; CHECK: store i32 42, i32* null
 ; CHECK-NOT: call void @llvm.trap()

diff  --git a/llvm/test/Transforms/SimplifyCFG/trapping-load-unreachable.ll b/llvm/test/Transforms/SimplifyCFG/trapping-load-unreachable.ll
index 7f904e5598ef..c16c618a9081 100644
--- a/llvm/test/Transforms/SimplifyCFG/trapping-load-unreachable.ll
+++ b/llvm/test/Transforms/SimplifyCFG/trapping-load-unreachable.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
 ; PR2967
 
 target datalayout =

diff  --git a/llvm/test/Transforms/SimplifyCFG/two-entry-phi-fold-crash.ll b/llvm/test/Transforms/SimplifyCFG/two-entry-phi-fold-crash.ll
index 46760e9d732c..347a685929a5 100644
--- a/llvm/test/Transforms/SimplifyCFG/two-entry-phi-fold-crash.ll
+++ b/llvm/test/Transforms/SimplifyCFG/two-entry-phi-fold-crash.ll
@@ -1,5 +1,5 @@
 ; NOTE: Assertions have been autogenerated by utils/update_test_checks.py
-; RUN: opt < %s -S -simplifycfg -debug-pass=Details -enable-new-pm=0 2>&1 | FileCheck %s
+; RUN: opt < %s -S -simplifycfg -simplifycfg-require-and-preserve-domtree=1 -debug-pass=Details -enable-new-pm=0 2>&1 | FileCheck %s
 
 ;; Check the report from the pass manager, telling us whether simplifycfg
 ;; reported the "changed" status correctly:

diff  --git a/llvm/test/Transforms/SimplifyCFG/volatile-phioper.ll b/llvm/test/Transforms/SimplifyCFG/volatile-phioper.ll
index bfa06269e17f..467251e6f642 100644
--- a/llvm/test/Transforms/SimplifyCFG/volatile-phioper.ll
+++ b/llvm/test/Transforms/SimplifyCFG/volatile-phioper.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
 ;
 ; rdar:13349374
 ;


        


More information about the llvm-commits mailing list