Skip to content

Commit 164e084

Browse files
committed
[SimplifyCFG] DeleteDeadBlock() 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.
1 parent c755e41 commit 164e084

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

64 files changed

+85
-85
lines changed

llvm/lib/Transforms/Utils/SimplifyCFG.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6316,7 +6316,7 @@ bool SimplifyCFGOpt::simplifyOnce(BasicBlock *BB) {
63166316
if ((pred_empty(BB) && BB != &BB->getParent()->getEntryBlock()) ||
63176317
BB->getSinglePredecessor() == BB) {
63186318
LLVM_DEBUG(dbgs() << "Removing BB: \n" << *BB);
6319-
DeleteDeadBlock(BB);
6319+
DeleteDeadBlock(BB, DTU);
63206320
return true;
63216321
}
63226322

llvm/test/Transforms/GVNSink/indirect-call.ll

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
; RUN: opt < %s -gvn-sink -simplifycfg -hoist-common-insts=true -simplifycfg-sink-common=false -S | FileCheck %s
1+
; RUN: opt < %s -gvn-sink -simplifycfg -simplifycfg-require-and-preserve-domtree=1 -hoist-common-insts=true -simplifycfg-sink-common=false -S | FileCheck %s
22

33
declare i8 @ext(i1)
44

llvm/test/Transforms/GVNSink/sink-common-code.ll

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
; RUN: opt < %s -gvn-sink -simplifycfg -hoist-common-insts=true -simplifycfg-sink-common=false -S | FileCheck %s
1+
; RUN: opt < %s -gvn-sink -simplifycfg -simplifycfg-require-and-preserve-domtree=1 -hoist-common-insts=true -simplifycfg-sink-common=false -S | FileCheck %s
22

33
define zeroext i1 @test1(i1 zeroext %flag, i32 %blksA, i32 %blksB, i32 %nblks) {
44
entry:

llvm/test/Transforms/IndVarSimplify/loop_evaluate_1.ll

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
; NOTE: Assertions have been autogenerated by utils/update_test_checks.py
2-
; RUN: opt < %s -indvars -loop-deletion -simplifycfg -S | FileCheck %s
2+
; RUN: opt < %s -indvars -loop-deletion -simplifycfg -simplifycfg-require-and-preserve-domtree=1 -S | FileCheck %s
33

44
; Testcase distilled from 256.bzip2
55
define i32 @test1() {

llvm/test/Transforms/IndVarSimplify/loop_evaluate_2.ll

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
; RUN: opt < %s -indvars -loop-deletion -simplifycfg | opt -analyze -loops -enable-new-pm=0 | FileCheck %s
1+
; RUN: opt < %s -indvars -loop-deletion -simplifycfg -simplifycfg-require-and-preserve-domtree=1 | opt -analyze -loops -enable-new-pm=0 | FileCheck %s
22
; PR1179
33

44
; CHECK-NOT: Loop Containing

llvm/test/Transforms/JumpThreading/lvi-tristate.ll

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
; NOTE: Assertions have been autogenerated by utils/update_test_checks.py
2-
; RUN: opt -jump-threading -simplifycfg -simplifycfg-require-and-preserve-domtree=1 -S < %s | FileCheck %s
2+
; RUN: opt -jump-threading -simplifycfg -S < %s | FileCheck %s
33
declare void @ham()
44

55
define void @hoge() {

llvm/test/Transforms/LoopDeletion/simplify-then-delete.ll

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
; RUN: opt < %s -S -indvars -loop-deletion -simplifycfg | FileCheck %s
1+
; RUN: opt < %s -S -indvars -loop-deletion -simplifycfg -simplifycfg-require-and-preserve-domtree=1 | FileCheck %s
22
; PR5794
33

44
; Indvars and loop deletion should be able to eliminate all looping

llvm/test/Transforms/LoopVectorize/if-pred-non-void.ll

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
; RUN: opt -S -force-vector-width=2 -force-vector-interleave=1 -loop-vectorize -verify-loop-info -simplifycfg < %s | FileCheck %s
1+
; 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
22
; RUN: opt -S -force-vector-width=1 -force-vector-interleave=2 -loop-vectorize -verify-loop-info < %s | FileCheck %s --check-prefix=UNROLL-NO-VF
33

44
target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
@@ -192,7 +192,7 @@ if.then: ; preds = %check, %for.body
192192
br label %if.end
193193

194194
if.end: ; preds = %if.then, %check
195-
%ysd.0 = phi i32 [ %rsd, %if.then ], [ %psd, %check ]
195+
%ysd.0 = phi i32 [ %rsd, %if.then ], [ %psd, %check ]
196196
store i32 %ysd.0, i32* %isd, align 4
197197
%indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
198198
%exitcond = icmp eq i64 %indvars.iv.next, 128

llvm/test/Transforms/PhaseOrdering/unsigned-multiply-overflow-check.ll

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
; NOTE: Assertions have been autogenerated by utils/update_test_checks.py
2-
; RUN: opt -simplifycfg -S < %s | FileCheck %s --check-prefix=SIMPLIFYCFG
2+
; RUN: opt -simplifycfg -simplifycfg-require-and-preserve-domtree=1 -S < %s | FileCheck %s --check-prefix=SIMPLIFYCFG
33
; RUN: opt -instcombine -S < %s | FileCheck %s --check-prefix=INSTCOMBINEONLY
4-
; RUN: opt -instcombine -simplifycfg -S < %s | FileCheck %s --check-prefix=INSTCOMBINESIMPLIFYCFGONLY
5-
; RUN: opt -instcombine -simplifycfg -instcombine -S < %s | FileCheck %s --check-prefix=INSTCOMBINESIMPLIFYCFGINSTCOMBINE
6-
; RUN: opt -instcombine -simplifycfg -phi-node-folding-threshold=3 -S < %s | FileCheck %s --check-prefix=INSTCOMBINESIMPLIFYCFGONLY
7-
; RUN: opt -instcombine -simplifycfg -instcombine -phi-node-folding-threshold=3 -S < %s | FileCheck %s --check-prefix=INSTCOMBINESIMPLIFYCFGINSTCOMBINE
4+
; RUN: opt -instcombine -simplifycfg -simplifycfg-require-and-preserve-domtree=1 -S < %s | FileCheck %s --check-prefix=INSTCOMBINESIMPLIFYCFGONLY
5+
; RUN: opt -instcombine -simplifycfg -simplifycfg-require-and-preserve-domtree=1 -instcombine -S < %s | FileCheck %s --check-prefix=INSTCOMBINESIMPLIFYCFGINSTCOMBINE
6+
; RUN: opt -instcombine -simplifycfg -simplifycfg-require-and-preserve-domtree=1 -phi-node-folding-threshold=3 -S < %s | FileCheck %s --check-prefix=INSTCOMBINESIMPLIFYCFGONLY
7+
; RUN: opt -instcombine -simplifycfg -simplifycfg-require-and-preserve-domtree=1 -instcombine -phi-node-folding-threshold=3 -S < %s | FileCheck %s --check-prefix=INSTCOMBINESIMPLIFYCFGINSTCOMBINE
88

99
target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
1010
target triple = "x86_64-pc-linux-gnu"

llvm/test/Transforms/SimplifyCFG/2005-06-16-PHICrash.ll

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
; RUN: opt < %s -simplifycfg -disable-output
1+
; RUN: opt < %s -simplifycfg -simplifycfg-require-and-preserve-domtree=1 -disable-output
22
; PR584
33
@g_38098584 = external global i32 ; <i32*> [#uses=1]
44
@g_60187400 = external global i32 ; <i32*> [#uses=1]

llvm/test/Transforms/SimplifyCFG/2006-12-08-Ptr-ICmp-Branch.ll

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
; RUN: opt < %s -simplifycfg | llvm-dis
1+
; RUN: opt < %s -simplifycfg -simplifycfg-require-and-preserve-domtree=1 | llvm-dis
22
; END.
33

44
; ModuleID = '2006-12-08-Ptr-ICmp-Branch.ll'

llvm/test/Transforms/SimplifyCFG/2008-12-06-SingleEntryPhi.ll

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
; RUN: opt < %s -simplifycfg | llvm-dis
1+
; RUN: opt < %s -simplifycfg -simplifycfg-require-and-preserve-domtree=1 | llvm-dis
22
define i32 @test() {
33
entry:
44
br label %T

llvm/test/Transforms/SimplifyCFG/2008-12-16-DCECond.ll

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
; RUN: opt < %s -simplifycfg -S -hoist-common-insts=true | not grep icmp
1+
; RUN: opt < %s -simplifycfg -simplifycfg-require-and-preserve-domtree=1 -S -hoist-common-insts=true | not grep icmp
22
; ModuleID = '/tmp/x.bc'
33
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"
44
target triple = "i686-pc-linux-gnu"

llvm/test/Transforms/SimplifyCFG/2009-01-18-PHIPropCrash.ll

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
; RUN: opt < %s -simplifycfg -disable-output
1+
; RUN: opt < %s -simplifycfg -simplifycfg-require-and-preserve-domtree=1 -disable-output
22
; PR3016
33
; Dead use caused invariant violation.
44

llvm/test/Transforms/SimplifyCFG/ARM/branch-fold-threshold.ll

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
; NOTE: Assertions have been autogenerated by utils/update_test_checks.py
2-
; RUN: opt -mtriple=thumbv8m.main %s -simplifycfg -S | FileCheck %s --check-prefix=CHECK --check-prefix=THUMB
3-
; RUN: opt -mtriple=thumbv8a %s -simplifycfg -S | FileCheck %s --check-prefix=CHECK --check-prefix=THUMB
4-
; RUN: opt -mtriple=armv8a %s -simplifycfg -S | FileCheck %s --check-prefix=CHECK --check-prefix=ARM
2+
; RUN: opt -mtriple=thumbv8m.main %s -simplifycfg -simplifycfg-require-and-preserve-domtree=1 -S | FileCheck %s --check-prefix=CHECK --check-prefix=THUMB
3+
; RUN: opt -mtriple=thumbv8a %s -simplifycfg -simplifycfg-require-and-preserve-domtree=1 -S | FileCheck %s --check-prefix=CHECK --check-prefix=THUMB
4+
; RUN: opt -mtriple=armv8a %s -simplifycfg -simplifycfg-require-and-preserve-domtree=1 -S | FileCheck %s --check-prefix=CHECK --check-prefix=ARM
55

66
define i32 @foo(i32 %a, i32 %b, i32 %c, i32 %d, i32* %input) {
77
; CHECK-LABEL: @foo(

llvm/test/Transforms/SimplifyCFG/ARM/phi-eliminate.ll

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
; NOTE: Assertions have been autogenerated by utils/update_test_checks.py
2-
; RUN: opt -mtriple=thumbv8m.main < %s -simplifycfg -S -two-entry-phi-node-folding-threshold=4 | FileCheck %s --check-prefixes=CHECK-TWO-FOLD-4,CHECK-V8M-TWO-FOLD-4
3-
; RUN: opt -mtriple=armv8a < %s -simplifycfg -S -two-entry-phi-node-folding-threshold=4 | FileCheck %s --check-prefixes=CHECK-TWO-FOLD-4,CHECK-V8A-TWO-FOLD-4
4-
; RUN: opt -mtriple=thumbv8m.main < %s -simplifycfg -S -two-entry-phi-node-folding-threshold=5 | FileCheck %s --check-prefixes=CHECK-TWO-FOLD-5,CHECK-V8M-TWO-FOLD-5
5-
; RUN: opt -mtriple=armv8a < %s -simplifycfg -S -two-entry-phi-node-folding-threshold=5 | FileCheck %s --check-prefixes=CHECK-TWO-FOLD-5,CHECK-V8A-TWO-FOLD-5
6-
; RUN: opt -mtriple=thumbv8m.main < %s -simplifycfg -S -two-entry-phi-node-folding-threshold=6 | FileCheck %s --check-prefixes=CHECK-TWO-FOLD-6,CHECK-V8M-TWO-FOLD-6
7-
; RUN: opt -mtriple=armv8a < %s -simplifycfg -S -two-entry-phi-node-folding-threshold=6 | FileCheck %s --check-prefixes=CHECK-TWO-FOLD-6,CHECK-V8A-TWO-FOLD-6
2+
; RUN: opt -mtriple=thumbv8m.main < %s -simplifycfg -simplifycfg-require-and-preserve-domtree=1 -S -two-entry-phi-node-folding-threshold=4 | FileCheck %s --check-prefixes=CHECK-TWO-FOLD-4,CHECK-V8M-TWO-FOLD-4
3+
; RUN: opt -mtriple=armv8a < %s -simplifycfg -simplifycfg-require-and-preserve-domtree=1 -S -two-entry-phi-node-folding-threshold=4 | FileCheck %s --check-prefixes=CHECK-TWO-FOLD-4,CHECK-V8A-TWO-FOLD-4
4+
; RUN: opt -mtriple=thumbv8m.main < %s -simplifycfg -simplifycfg-require-and-preserve-domtree=1 -S -two-entry-phi-node-folding-threshold=5 | FileCheck %s --check-prefixes=CHECK-TWO-FOLD-5,CHECK-V8M-TWO-FOLD-5
5+
; RUN: opt -mtriple=armv8a < %s -simplifycfg -simplifycfg-require-and-preserve-domtree=1 -S -two-entry-phi-node-folding-threshold=5 | FileCheck %s --check-prefixes=CHECK-TWO-FOLD-5,CHECK-V8A-TWO-FOLD-5
6+
; RUN: opt -mtriple=thumbv8m.main < %s -simplifycfg -simplifycfg-require-and-preserve-domtree=1 -S -two-entry-phi-node-folding-threshold=6 | FileCheck %s --check-prefixes=CHECK-TWO-FOLD-6,CHECK-V8M-TWO-FOLD-6
7+
; RUN: opt -mtriple=armv8a < %s -simplifycfg -simplifycfg-require-and-preserve-domtree=1 -S -two-entry-phi-node-folding-threshold=6 | FileCheck %s --check-prefixes=CHECK-TWO-FOLD-6,CHECK-V8A-TWO-FOLD-6
88

99
define i32 @test_i32(i1 %a, i1 %b, i32 %i, i32 %j, i32 %k) {
1010
; CHECK-TWO-FOLD-4-LABEL: @test_i32(

llvm/test/Transforms/SimplifyCFG/ARM/select-trunc-i64.ll

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
; NOTE: Assertions have been autogenerated by utils/update_test_checks.py
2-
;RUN: opt -S -simplifycfg -mtriple=arm < %s | FileCheck %s
2+
;RUN: opt -S -simplifycfg -simplifycfg-require-and-preserve-domtree=1 -mtriple=arm < %s | FileCheck %s
33
target datalayout = "e-m:e-p:32:32-i64:64-v128:64:128-a:0:32-n32-S64"
44

55
define arm_aapcscc i32 @select_trunc_i64(i32 %a, i32 %b) {

llvm/test/Transforms/SimplifyCFG/ARM/speculate-math.ll

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
; NOTE: Assertions have been autogenerated by utils/update_test_checks.py
2-
; RUN: opt -S -simplifycfg -mtriple=thumbv8.1m.main -mattr=+mve < %s | FileCheck %s --check-prefix=CHECK-MVE
3-
; RUN: opt -S -simplifycfg -mtriple=thumbv8m.main < %s | FileCheck %s --check-prefix=CHECK-V8M-MAIN
4-
; RUN: opt -S -simplifycfg -mtriple=thumbv8m.base < %s | FileCheck %s --check-prefix=CHECK-V8M-BASE
2+
; RUN: opt -S -simplifycfg -simplifycfg-require-and-preserve-domtree=1 -mtriple=thumbv8.1m.main -mattr=+mve < %s | FileCheck %s --check-prefix=CHECK-MVE
3+
; RUN: opt -S -simplifycfg -simplifycfg-require-and-preserve-domtree=1 -mtriple=thumbv8m.main < %s | FileCheck %s --check-prefix=CHECK-V8M-MAIN
4+
; RUN: opt -S -simplifycfg -simplifycfg-require-and-preserve-domtree=1 -mtriple=thumbv8m.base < %s | FileCheck %s --check-prefix=CHECK-V8M-BASE
55

66
declare float @llvm.sqrt.f32(float) nounwind readonly
77
declare float @llvm.fma.f32(float, float, float) nounwind readonly

llvm/test/Transforms/SimplifyCFG/BrUnwind.ll

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
; RUN: opt < %s -simplifycfg -hoist-common-insts=true -S | \
1+
; RUN: opt < %s -simplifycfg -simplifycfg-require-and-preserve-domtree=1 -hoist-common-insts=true -S | \
22
; RUN: not grep "br label"
33

44
define void @test(i1 %C) {

llvm/test/Transforms/SimplifyCFG/ConditionalTrappingConstantExpr.ll

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
; NOTE: Assertions have been autogenerated by utils/update_test_checks.py
2-
; RUN: opt < %s -simplifycfg -S | FileCheck %s
2+
; RUN: opt < %s -simplifycfg -simplifycfg-require-and-preserve-domtree=1 -S | FileCheck %s
33

44
@G = extern_weak global i32
55

llvm/test/Transforms/SimplifyCFG/DeadSetCC.ll

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
; RUN: opt < %s -simplifycfg -S | \
1+
; RUN: opt < %s -simplifycfg -simplifycfg-require-and-preserve-domtree=1 -S | \
22
; RUN: not grep "icmp eq"
33

44
; Check that simplifycfg deletes a dead 'seteq' instruction when it

llvm/test/Transforms/SimplifyCFG/HoistCode.ll

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
; NOTE: Assertions have been autogenerated by utils/update_test_checks.py
22
; RUN: opt < %s -passes=simplifycfg -hoist-common-insts=true -S | FileCheck %s
3-
; RUN: opt < %s -simplifycfg -hoist-common-insts=true -S | FileCheck %s
3+
; RUN: opt < %s -simplifycfg -simplifycfg-require-and-preserve-domtree=1 -hoist-common-insts=true -S | FileCheck %s
44

55
define void @foo(i1 %C, i32* %P) {
66
; CHECK-LABEL: @foo(

llvm/test/Transforms/SimplifyCFG/PR25267.ll

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
; RUN: opt < %s -simplifycfg -S | FileCheck %s
1+
; RUN: opt < %s -simplifycfg -simplifycfg-require-and-preserve-domtree=1 -S | FileCheck %s
22

33
define void @f() {
44
entry:

llvm/test/Transforms/SimplifyCFG/PR9946.ll

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
; RUN: opt -simplifycfg -disable-output < %s
1+
; RUN: opt -simplifycfg -simplifycfg-require-and-preserve-domtree=1 -disable-output < %s
22

33
@foo = external constant i32
44

llvm/test/Transforms/SimplifyCFG/PhiBlockMerge.ll

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
; NOTE: Assertions have been autogenerated by update_test_checks.py
22
; Test merging of blocks that only have PHI nodes in them
33
;
4-
; RUN: opt < %s -simplifycfg -S | FileCheck %s
4+
; RUN: opt < %s -simplifycfg -simplifycfg-require-and-preserve-domtree=1 -S | FileCheck %s
55
;
66

77
define i32 @test(i1 %a, i1 %b) {

llvm/test/Transforms/SimplifyCFG/PhiEliminate2.ll

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
; RUN: opt < %s -simplifycfg -S | FileCheck %s
1+
; RUN: opt < %s -simplifycfg -simplifycfg-require-and-preserve-domtree=1 -S | FileCheck %s
22

33
; Use a select to make this a single BB.
44
; Also, make sure the profile metadata is propagated to the select (PR26636).

llvm/test/Transforms/SimplifyCFG/RISCV/select-trunc-i64.ll

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
;RUN: opt -S -simplifycfg -mtriple=riscv32 < %s | FileCheck %s
1+
;RUN: opt -S -simplifycfg -simplifycfg-require-and-preserve-domtree=1 -mtriple=riscv32 < %s | FileCheck %s
22

33
; Test case taken from test/Transforms/SimplifyCFG/ARM/select-trunc-i64.ll.
44
; A correct implementation of isTruncateFree allows this test case to be

llvm/test/Transforms/SimplifyCFG/UncondBranchToReturn.ll

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
; a PHI node and a return. Make sure the simplify cfg can straighten out this
33
; important case. This is basically the most trivial form of tail-duplication.
44

5-
; RUN: opt < %s -simplifycfg -hoist-common-insts=true -S | \
5+
; RUN: opt < %s -simplifycfg -simplifycfg-require-and-preserve-domtree=1 -hoist-common-insts=true -S | \
66
; RUN: not grep "br label"
77

88
define i32 @test(i1 %B, i32 %A, i32 %B.upgrd.1) {

llvm/test/Transforms/SimplifyCFG/X86/CoveredLookupTable.ll

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
; NOTE: Assertions have been autogenerated by utils/update_test_checks.py
2-
; RUN: opt -simplifycfg -switch-to-lookup -S %s | FileCheck %s
2+
; RUN: opt -simplifycfg -simplifycfg-require-and-preserve-domtree=1 -switch-to-lookup -S %s | FileCheck %s
33
; RUN: opt -passes='simplify-cfg<switch-to-lookup>' -S %s | FileCheck %s
44
; rdar://15268442
55

llvm/test/Transforms/SimplifyCFG/X86/PR29163.ll

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
; RUN: opt -S -simplifycfg < %s | FileCheck %s
1+
; RUN: opt -S -simplifycfg -simplifycfg-require-and-preserve-domtree=1 < %s | FileCheck %s
22
target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
33
target triple = "x86_64-unknown-linux-gnu"
44

llvm/test/Transforms/SimplifyCFG/X86/SpeculativeExec.ll

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
; NOTE: Assertions have been autogenerated by utils/update_test_checks.py
2-
; RUN: opt < %s -simplifycfg -phi-node-folding-threshold=2 -S | FileCheck %s
2+
; RUN: opt < %s -simplifycfg -simplifycfg-require-and-preserve-domtree=1 -phi-node-folding-threshold=2 -S | FileCheck %s
33

44
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"
55
target triple = "x86_64-unknown-linux-gnu"

llvm/test/Transforms/SimplifyCFG/X86/pr39187-g.ll

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
; RUN: opt < %s -S -simplifycfg -hoist-common-insts=true | FileCheck %s
1+
; RUN: opt < %s -S -simplifycfg -simplifycfg-require-and-preserve-domtree=1 -hoist-common-insts=true | FileCheck %s
22

33
; SimplifyCFG can hoist any common code in the 'then' and 'else' blocks to
44
; the 'if' basic block.

llvm/test/Transforms/SimplifyCFG/X86/safe-low-bit-extract.ll

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
; NOTE: Assertions have been autogenerated by utils/update_test_checks.py
2-
; RUN: opt < %s -simplifycfg -S | FileCheck %s
2+
; RUN: opt < %s -simplifycfg -simplifycfg-require-and-preserve-domtree=1 -S | FileCheck %s
33

44
; This is the naive implementation of x86 BZHI/BEXTR instruction:
55
; it takes input and bit count, and extracts low nbits up to bit width.

llvm/test/Transforms/SimplifyCFG/X86/speculate-cttz-ctlz.ll

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
; NOTE: Assertions have been autogenerated by utils/update_test_checks.py
2-
; RUN: opt -S -simplifycfg -mtriple=x86_64-unknown-unknown -mattr=+bmi < %s | FileCheck %s --check-prefix=ALL --check-prefix=BMI
3-
; RUN: opt -S -simplifycfg -mtriple=x86_64-unknown-unknown -mattr=+lzcnt < %s | FileCheck %s --check-prefix=ALL --check-prefix=LZCNT
4-
; RUN: opt -S -simplifycfg -mtriple=x86_64-unknown-unknown < %s | FileCheck %s --check-prefix=ALL --check-prefix=GENERIC
2+
; RUN: opt -S -simplifycfg -simplifycfg-require-and-preserve-domtree=1 -mtriple=x86_64-unknown-unknown -mattr=+bmi < %s | FileCheck %s --check-prefix=ALL --check-prefix=BMI
3+
; RUN: opt -S -simplifycfg -simplifycfg-require-and-preserve-domtree=1 -mtriple=x86_64-unknown-unknown -mattr=+lzcnt < %s | FileCheck %s --check-prefix=ALL --check-prefix=LZCNT
4+
; RUN: opt -S -simplifycfg -simplifycfg-require-and-preserve-domtree=1 -mtriple=x86_64-unknown-unknown < %s | FileCheck %s --check-prefix=ALL --check-prefix=GENERIC
55

66

77
define i64 @test1(i64 %A) {

llvm/test/Transforms/SimplifyCFG/X86/switch-covered-bug.ll

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
; NOTE: Assertions have been autogenerated by utils/update_test_checks.py
2-
; RUN: opt -S -simplifycfg -switch-to-lookup < %s -mtriple=x86_64-apple-darwin12.0.0 | FileCheck %s
2+
; RUN: opt -S -simplifycfg -simplifycfg-require-and-preserve-domtree=1 -switch-to-lookup < %s -mtriple=x86_64-apple-darwin12.0.0 | FileCheck %s
33
; RUN: opt -S -passes='simplify-cfg<switch-to-lookup>' < %s -mtriple=x86_64-apple-darwin12.0.0 | FileCheck %s
44

55
; rdar://17887153

llvm/test/Transforms/SimplifyCFG/X86/switch-table-bug.ll

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
; NOTE: Assertions have been autogenerated by utils/update_test_checks.py
2-
; RUN: opt -S -simplifycfg -switch-to-lookup < %s -mtriple=x86_64-apple-darwin12.0.0 | FileCheck %s
2+
; RUN: opt -S -simplifycfg -simplifycfg-require-and-preserve-domtree=1 -switch-to-lookup < %s -mtriple=x86_64-apple-darwin12.0.0 | FileCheck %s
33
; RUN: opt -S -passes='simplify-cfg<switch-to-lookup>' < %s -mtriple=x86_64-apple-darwin12.0.0 | FileCheck %s
44

55
; rdar://17735071

llvm/test/Transforms/SimplifyCFG/annotations.ll

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
; RUN: opt -simplifycfg -S %s | FileCheck --match-full-lines %s
1+
; RUN: opt -simplifycfg -simplifycfg-require-and-preserve-domtree=1 -S %s | FileCheck --match-full-lines %s
22

33
; The branch in %cont has !annotation metadata. Make sure generated AND
44
; has !annotation metadata.

llvm/test/Transforms/SimplifyCFG/basictest.ll

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
; Test CFG simplify removal of branch instructions.
22
;
3-
; RUN: opt < %s -simplifycfg -S | FileCheck %s
3+
; RUN: opt < %s -simplifycfg -simplifycfg-require-and-preserve-domtree=1 -S | FileCheck %s
44
; RUN: opt < %s -passes=simplify-cfg -S | FileCheck %s
55

66
define void @test1() {

llvm/test/Transforms/SimplifyCFG/bbi-23595.ll

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
; RUN: opt < %s -S -simplifycfg | FileCheck %s
1+
; RUN: opt < %s -S -simplifycfg -simplifycfg-require-and-preserve-domtree=1 | FileCheck %s
22

33
; In 'simplifycfg', during the flattening of a 'br', the instructions for the
44
; 'true' and 'false' parts, are moved out from their respective basic blocks.

llvm/test/Transforms/SimplifyCFG/branch-fold-dbg.ll

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
; RUN: opt -simplifycfg -S < %s | FileCheck %s
1+
; RUN: opt -simplifycfg -simplifycfg-require-and-preserve-domtree=1 -S < %s | FileCheck %s
22

33
%0 = type { i32*, i32* }
44

llvm/test/Transforms/SimplifyCFG/branch-fold-threshold.ll

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
; RUN: opt %s -simplifycfg -S | FileCheck %s --check-prefix=NORMAL
2-
; RUN: opt %s -simplifycfg -S -bonus-inst-threshold=2 | FileCheck %s --check-prefix=AGGRESSIVE
3-
; RUN: opt %s -simplifycfg -S -bonus-inst-threshold=4 | FileCheck %s --check-prefix=WAYAGGRESSIVE
1+
; RUN: opt %s -simplifycfg -simplifycfg-require-and-preserve-domtree=1 -S | FileCheck %s --check-prefix=NORMAL
2+
; RUN: opt %s -simplifycfg -simplifycfg-require-and-preserve-domtree=1 -S -bonus-inst-threshold=2 | FileCheck %s --check-prefix=AGGRESSIVE
3+
; RUN: opt %s -simplifycfg -simplifycfg-require-and-preserve-domtree=1 -S -bonus-inst-threshold=4 | FileCheck %s --check-prefix=WAYAGGRESSIVE
44
; RUN: opt %s -passes=simplify-cfg -S | FileCheck %s --check-prefix=NORMAL
55
; RUN: opt %s -passes='simplify-cfg<bonus-inst-threshold=2>' -S | FileCheck %s --check-prefix=AGGRESSIVE
66
; RUN: opt %s -passes='simplify-cfg<bonus-inst-threshold=4>' -S | FileCheck %s --check-prefix=WAYAGGRESSIVE

llvm/test/Transforms/SimplifyCFG/clamp.ll

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
; RUN: opt < %s -simplifycfg -S | FileCheck %s
1+
; RUN: opt < %s -simplifycfg -simplifycfg-require-and-preserve-domtree=1 -S | FileCheck %s
22

33
define float @clamp(float %a, float %b, float %c) {
44
; CHECK-LABEL: @clamp

llvm/test/Transforms/SimplifyCFG/common-dest-folding.ll

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
; RUN: opt < %s -simplifycfg -S | FileCheck %s
1+
; RUN: opt < %s -simplifycfg -simplifycfg-require-and-preserve-domtree=1 -S | FileCheck %s
22

33
;CHECK: @foo
44
;CHECK: and i32 %c1, %k

llvm/test/Transforms/SimplifyCFG/fold-debug-location.ll

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
; RUN: opt -S -simplifycfg < %s | FileCheck %s --match-full-lines
1+
; RUN: opt -S -simplifycfg -simplifycfg-require-and-preserve-domtree=1 < %s | FileCheck %s --match-full-lines
22

33
; Make sure we reset the debug location when folding instructions.
44
; CHECK: [[VAL:%.*]] = and i32 %c2, %k

0 commit comments

Comments
 (0)