2 changes: 1 addition & 1 deletion llvm/test/Transforms/SimplifyCFG/PR9946.ll
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
; RUN: opt -simplifycfg -disable-output < %s
; RUN: opt -simplifycfg -simplifycfg-require-and-preserve-domtree=1 -disable-output < %s

@foo = external constant i32

Expand Down
2 changes: 1 addition & 1 deletion llvm/test/Transforms/SimplifyCFG/PhiBlockMerge.ll
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
; NOTE: Assertions have been autogenerated by update_test_checks.py
; Test merging of blocks that only have PHI nodes in them
;
; RUN: opt < %s -simplifycfg -S | FileCheck %s
; RUN: opt < %s -simplifycfg -simplifycfg-require-and-preserve-domtree=1 -S | FileCheck %s
;

define i32 @test(i1 %a, i1 %b) {
Expand Down
2 changes: 1 addition & 1 deletion llvm/test/Transforms/SimplifyCFG/PhiEliminate2.ll
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
; RUN: opt < %s -simplifycfg -S | FileCheck %s
; RUN: opt < %s -simplifycfg -simplifycfg-require-and-preserve-domtree=1 -S | FileCheck %s

; Use a select to make this a single BB.
; Also, make sure the profile metadata is propagated to the select (PR26636).
Expand Down
2 changes: 1 addition & 1 deletion llvm/test/Transforms/SimplifyCFG/RISCV/select-trunc-i64.ll
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
;RUN: opt -S -simplifycfg -mtriple=riscv32 < %s | FileCheck %s
;RUN: opt -S -simplifycfg -simplifycfg-require-and-preserve-domtree=1 -mtriple=riscv32 < %s | FileCheck %s

; Test case taken from test/Transforms/SimplifyCFG/ARM/select-trunc-i64.ll.
; A correct implementation of isTruncateFree allows this test case to be
Expand Down
2 changes: 1 addition & 1 deletion llvm/test/Transforms/SimplifyCFG/UncondBranchToReturn.ll
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
; a PHI node and a return. Make sure the simplify cfg can straighten out this
; important case. This is basically the most trivial form of tail-duplication.

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

define i32 @test(i1 %B, i32 %A, i32 %B.upgrd.1) {
Expand Down
2 changes: 1 addition & 1 deletion llvm/test/Transforms/SimplifyCFG/UnreachableEliminate.ll
Original file line number Diff line number Diff line change
@@ -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 void @test1(i1 %C, i1* %BP) {
; CHECK-LABEL: @test1(
Expand Down
2 changes: 1 addition & 1 deletion llvm/test/Transforms/SimplifyCFG/X86/CoveredLookupTable.ll
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
; NOTE: Assertions have been autogenerated by utils/update_test_checks.py
; RUN: opt -simplifycfg -switch-to-lookup -S %s | FileCheck %s
; RUN: opt -simplifycfg -simplifycfg-require-and-preserve-domtree=1 -switch-to-lookup -S %s | FileCheck %s
; RUN: opt -passes='simplify-cfg<switch-to-lookup>' -S %s | FileCheck %s
; rdar://15268442

Expand Down
2 changes: 1 addition & 1 deletion llvm/test/Transforms/SimplifyCFG/X86/PR29163.ll
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
; 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-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-unknown-linux-gnu"

Expand Down
2 changes: 1 addition & 1 deletion llvm/test/Transforms/SimplifyCFG/X86/PR30210.ll
Original file line number Diff line number Diff line change
@@ -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-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-unknown-linux-gnu"

Expand Down
2 changes: 1 addition & 1 deletion llvm/test/Transforms/SimplifyCFG/X86/SpeculativeExec.ll
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
; NOTE: Assertions have been autogenerated by utils/update_test_checks.py
; RUN: opt < %s -simplifycfg -phi-node-folding-threshold=2 -S | FileCheck %s
; RUN: opt < %s -simplifycfg -simplifycfg-require-and-preserve-domtree=1 -phi-node-folding-threshold=2 -S | 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"
target triple = "x86_64-unknown-linux-gnu"
Expand Down
2 changes: 1 addition & 1 deletion llvm/test/Transforms/SimplifyCFG/X86/pr39187-g.ll
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
; RUN: opt < %s -S -simplifycfg -hoist-common-insts=true | FileCheck %s
; RUN: opt < %s -S -simplifycfg -simplifycfg-require-and-preserve-domtree=1 -hoist-common-insts=true | FileCheck %s

; SimplifyCFG can hoist any common code in the 'then' and 'else' blocks to
; the 'if' basic block.
Expand Down
Original file line number Diff line number Diff line change
@@ -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

; This is the naive implementation of x86 BZHI/BEXTR instruction:
; it takes input and bit count, and extracts low nbits up to bit width.
Expand Down
6 changes: 3 additions & 3 deletions llvm/test/Transforms/SimplifyCFG/X86/speculate-cttz-ctlz.ll
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
; NOTE: Assertions have been autogenerated by utils/update_test_checks.py
; RUN: opt -S -simplifycfg -mtriple=x86_64-unknown-unknown -mattr=+bmi < %s | FileCheck %s --check-prefix=ALL --check-prefix=BMI
; RUN: opt -S -simplifycfg -mtriple=x86_64-unknown-unknown -mattr=+lzcnt < %s | FileCheck %s --check-prefix=ALL --check-prefix=LZCNT
; RUN: opt -S -simplifycfg -mtriple=x86_64-unknown-unknown < %s | FileCheck %s --check-prefix=ALL --check-prefix=GENERIC
; 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
; 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
; RUN: opt -S -simplifycfg -simplifycfg-require-and-preserve-domtree=1 -mtriple=x86_64-unknown-unknown < %s | FileCheck %s --check-prefix=ALL --check-prefix=GENERIC


define i64 @test1(i64 %A) {
Expand Down
2 changes: 1 addition & 1 deletion llvm/test/Transforms/SimplifyCFG/X86/switch-covered-bug.ll
Original file line number Diff line number Diff line change
@@ -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-apple-darwin12.0.0 | FileCheck %s
; RUN: opt -S -simplifycfg -simplifycfg-require-and-preserve-domtree=1 -switch-to-lookup < %s -mtriple=x86_64-apple-darwin12.0.0 | FileCheck %s
; RUN: opt -S -passes='simplify-cfg<switch-to-lookup>' < %s -mtriple=x86_64-apple-darwin12.0.0 | FileCheck %s

; rdar://17887153
Expand Down
2 changes: 1 addition & 1 deletion llvm/test/Transforms/SimplifyCFG/X86/switch-table-bug.ll
Original file line number Diff line number Diff line change
@@ -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-apple-darwin12.0.0 | FileCheck %s
; RUN: opt -S -simplifycfg -simplifycfg-require-and-preserve-domtree=1 -switch-to-lookup < %s -mtriple=x86_64-apple-darwin12.0.0 | FileCheck %s
; RUN: opt -S -passes='simplify-cfg<switch-to-lookup>' < %s -mtriple=x86_64-apple-darwin12.0.0 | FileCheck %s

; rdar://17735071
Expand Down
2 changes: 1 addition & 1 deletion llvm/test/Transforms/SimplifyCFG/annotations.ll
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
; RUN: opt -simplifycfg -S %s | FileCheck --match-full-lines %s
; RUN: opt -simplifycfg -simplifycfg-require-and-preserve-domtree=1 -S %s | FileCheck --match-full-lines %s

; The branch in %cont has !annotation metadata. Make sure generated AND
; has !annotation metadata.
Expand Down
2 changes: 1 addition & 1 deletion llvm/test/Transforms/SimplifyCFG/basictest.ll
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
; Test CFG simplify removal of branch instructions.
;
; 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

define void @test1() {
Expand Down
2 changes: 1 addition & 1 deletion llvm/test/Transforms/SimplifyCFG/bbi-23595.ll
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
; RUN: opt < %s -S -simplifycfg | FileCheck %s
; RUN: opt < %s -S -simplifycfg -simplifycfg-require-and-preserve-domtree=1 | FileCheck %s

; In 'simplifycfg', during the flattening of a 'br', the instructions for the
; 'true' and 'false' parts, are moved out from their respective basic blocks.
Expand Down
2 changes: 1 addition & 1 deletion llvm/test/Transforms/SimplifyCFG/branch-fold-dbg.ll
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
; RUN: opt -simplifycfg -S < %s | FileCheck %s
; RUN: opt -simplifycfg -simplifycfg-require-and-preserve-domtree=1 -S < %s | FileCheck %s

%0 = type { i32*, i32* }

Expand Down
6 changes: 3 additions & 3 deletions llvm/test/Transforms/SimplifyCFG/branch-fold-threshold.ll
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
; RUN: opt %s -simplifycfg -S | FileCheck %s --check-prefix=NORMAL
; RUN: opt %s -simplifycfg -S -bonus-inst-threshold=2 | FileCheck %s --check-prefix=AGGRESSIVE
; RUN: opt %s -simplifycfg -S -bonus-inst-threshold=4 | FileCheck %s --check-prefix=WAYAGGRESSIVE
; RUN: opt %s -simplifycfg -simplifycfg-require-and-preserve-domtree=1 -S | FileCheck %s --check-prefix=NORMAL
; RUN: opt %s -simplifycfg -simplifycfg-require-and-preserve-domtree=1 -S -bonus-inst-threshold=2 | FileCheck %s --check-prefix=AGGRESSIVE
; RUN: opt %s -simplifycfg -simplifycfg-require-and-preserve-domtree=1 -S -bonus-inst-threshold=4 | FileCheck %s --check-prefix=WAYAGGRESSIVE
; RUN: opt %s -passes=simplify-cfg -S | FileCheck %s --check-prefix=NORMAL
; RUN: opt %s -passes='simplify-cfg<bonus-inst-threshold=2>' -S | FileCheck %s --check-prefix=AGGRESSIVE
; RUN: opt %s -passes='simplify-cfg<bonus-inst-threshold=4>' -S | FileCheck %s --check-prefix=WAYAGGRESSIVE
Expand Down
2 changes: 1 addition & 1 deletion llvm/test/Transforms/SimplifyCFG/branch-fold.ll
Original file line number Diff line number Diff line change
@@ -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 @test(i32* %P, i32* %Q, i1 %A, i1 %B) {
; CHECK: test
Expand Down
2 changes: 1 addition & 1 deletion llvm/test/Transforms/SimplifyCFG/clamp.ll
Original file line number Diff line number Diff line change
@@ -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 float @clamp(float %a, float %b, float %c) {
; CHECK-LABEL: @clamp
Expand Down
2 changes: 1 addition & 1 deletion llvm/test/Transforms/SimplifyCFG/common-dest-folding.ll
Original file line number Diff line number Diff line change
@@ -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: @foo
;CHECK: and i32 %c1, %k
Expand Down
2 changes: 1 addition & 1 deletion llvm/test/Transforms/SimplifyCFG/empty-catchpad.ll
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
; RUN: opt < %s -simplifycfg -S | FileCheck %s
; RUN: opt < %s -simplifycfg -simplifycfg-require-and-preserve-domtree=1 -S | FileCheck %s

declare void @f()
declare void @llvm.foo(i32) nounwind
Expand Down
2 changes: 1 addition & 1 deletion llvm/test/Transforms/SimplifyCFG/fold-debug-info.ll
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
;; Check that we don't crash. PR37300.
; 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

define void @patatino() {
; CHECK-LABEL: @patatino(
Expand Down
2 changes: 1 addition & 1 deletion llvm/test/Transforms/SimplifyCFG/fold-debug-location.ll
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
; RUN: opt -S -simplifycfg < %s | FileCheck %s --match-full-lines
; RUN: opt -S -simplifycfg -simplifycfg-require-and-preserve-domtree=1 < %s | FileCheck %s --match-full-lines

; Make sure we reset the debug location when folding instructions.
; CHECK: [[VAL:%.*]] = and i32 %c2, %k
Expand Down
2 changes: 1 addition & 1 deletion llvm/test/Transforms/SimplifyCFG/hoist-common-code.ll
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
; RUN: opt < %s -simplifycfg -S -hoist-common-insts=true | not grep br
; RUN: opt < %s -simplifycfg -simplifycfg-require-and-preserve-domtree=1 -S -hoist-common-insts=true | not grep br

declare void @bar(i32)

Expand Down
2 changes: 1 addition & 1 deletion llvm/test/Transforms/SimplifyCFG/hoist-dbgvalue-inlined.ll
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
; RUN: opt -simplifycfg -hoist-common-insts=true -S < %s | FileCheck %s
; RUN: opt -simplifycfg -simplifycfg-require-and-preserve-domtree=1 -hoist-common-insts=true -S < %s | FileCheck %s
; Verify that we don't crash due an invalid !dbg location on the hoisted llvm.dbg.value

define i64 @caller(i64* %ptr, i64 %flag) !dbg !10 {
Expand Down
2 changes: 1 addition & 1 deletion llvm/test/Transforms/SimplifyCFG/hoist-with-range.ll
Original file line number Diff line number Diff line change
@@ -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

define void @foo(i1 %c, i8* %p) {
; CHECK: if:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
; RUN: opt %s -S -simplifycfg | FileCheck %s
; RUN: opt %s -S -simplifycfg -simplifycfg-require-and-preserve-domtree=1 | FileCheck %s

declare void @is(i1)

Expand Down
2 changes: 1 addition & 1 deletion llvm/test/Transforms/SimplifyCFG/implied-cond-matching.ll
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
; RUN: opt %s -S -simplifycfg | FileCheck %s
; RUN: opt %s -S -simplifycfg -simplifycfg-require-and-preserve-domtree=1 | FileCheck %s

declare void @dead()
declare void @alive()
Expand Down
2 changes: 1 addition & 1 deletion llvm/test/Transforms/SimplifyCFG/implied-cond.ll
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
; RUN: opt %s -S -simplifycfg | FileCheck %s
; RUN: opt %s -S -simplifycfg -simplifycfg-require-and-preserve-domtree=1 | FileCheck %s
; Check for when one branch implies the value of a successors conditional and
; it's not simply the same conditional repeated.

Expand Down
2 changes: 1 addition & 1 deletion llvm/test/Transforms/SimplifyCFG/indirectbr.ll
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
; RUN: opt -S -simplifycfg < %s | FileCheck %s
; RUN: opt -S -simplifycfg -simplifycfg-require-and-preserve-domtree=1 < %s | FileCheck %s

; SimplifyCFG should eliminate redundant indirectbr edges.

Expand Down
2 changes: 1 addition & 1 deletion llvm/test/Transforms/SimplifyCFG/invoke_unwind_lifetime.ll
Original file line number Diff line number Diff line change
@@ -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.lifetime.start.p0i8(i64, i8*)
declare void @llvm.lifetime.end.p0i8(i64, i8*)
Expand Down
2 changes: 1 addition & 1 deletion llvm/test/Transforms/SimplifyCFG/no-md-sink.ll
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
; RUN: opt < %s -simplifycfg -sink-common-insts -S | FileCheck %s
; RUN: opt < %s -simplifycfg -simplifycfg-require-and-preserve-domtree=1 -sink-common-insts -S | FileCheck %s
; RUN: opt < %s -passes='simplify-cfg<sink-common-insts>' -S | FileCheck %s

define i1 @test1(i1 zeroext %flag, i8* %y) #0 {
Expand Down
2 changes: 1 addition & 1 deletion llvm/test/Transforms/SimplifyCFG/opt-for-fuzzing.ll
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
; RUN: opt < %s -simplifycfg -S | FileCheck %s
; RUN: opt < %s -simplifycfg -simplifycfg-require-and-preserve-domtree=1 -S | FileCheck %s
; RUN: opt < %s -passes=simplifycfg -S | FileCheck %s

define i32 @foo(i32 %x) optforfuzzing {
Expand Down
2 changes: 1 addition & 1 deletion llvm/test/Transforms/SimplifyCFG/pr39807.ll
Original file line number Diff line number Diff line change
@@ -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 @personality()

Expand Down
2 changes: 1 addition & 1 deletion llvm/test/Transforms/SimplifyCFG/preserve-branchweights.ll
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
; NOTE: Assertions have been autogenerated by utils/update_test_checks.py
; RUN: opt -simplifycfg -S -o - < %s | FileCheck %s
; RUN: opt -simplifycfg -simplifycfg-require-and-preserve-domtree=1 -S -o - < %s | FileCheck %s

declare void @helper(i32)

Expand Down
2 changes: 1 addition & 1 deletion llvm/test/Transforms/SimplifyCFG/rangereduce.ll
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
; NOTE: Assertions have been autogenerated by utils/update_test_checks.py
; RUN: opt < %s -simplifycfg -switch-to-lookup -S | FileCheck %s
; RUN: opt < %s -simplifycfg -simplifycfg-require-and-preserve-domtree=1 -switch-to-lookup -S | FileCheck %s
; RUN: opt < %s -passes='simplify-cfg<switch-to-lookup>' -S | FileCheck %s

target datalayout = "e-n32"
Expand Down
2 changes: 1 addition & 1 deletion llvm/test/Transforms/SimplifyCFG/safe-abs.ll
Original file line number Diff line number Diff line change
@@ -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

; Reduced from arm_abs_q31() from CMSIS DSP suite.
; https://reviews.llvm.org/D65148#1629010
Expand Down
Original file line number Diff line number Diff line change
@@ -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

; This looks like a normal sign extension, but it's not.
; This comes up in JPEG decoding. This check is really unpredictable,
Expand Down
4 changes: 2 additions & 2 deletions llvm/test/Transforms/SimplifyCFG/speculate-math.ll
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
; NOTE: Assertions have been autogenerated by utils/update_test_checks.py
; RUN: opt -S -simplifycfg < %s | FileCheck %s
; RUN: opt -S -simplifycfg -speculate-one-expensive-inst=false < %s | FileCheck %s
; RUN: opt -S -simplifycfg -simplifycfg-require-and-preserve-domtree=1 < %s | FileCheck %s
; RUN: opt -S -simplifycfg -simplifycfg-require-and-preserve-domtree=1 -speculate-one-expensive-inst=false < %s | FileCheck %s

declare float @llvm.sqrt.f32(float) nounwind readonly
declare float @llvm.fma.f32(float, float, float) nounwind readonly
Expand Down
2 changes: 1 addition & 1 deletion llvm/test/Transforms/SimplifyCFG/speculate-with-offset.ll
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
; RUN: opt -simplifycfg -S < %s | FileCheck %s
; RUN: opt -simplifycfg -simplifycfg-require-and-preserve-domtree=1 -S < %s | FileCheck %s

; This load is safe to speculate, as it's from a safe offset
; within an alloca.
Expand Down
2 changes: 1 addition & 1 deletion llvm/test/Transforms/SimplifyCFG/switch-masked-bits.ll
Original file line number Diff line number Diff line change
@@ -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 i32 @test1(i32 %x) nounwind {
; CHECK-LABEL: @test1(
Expand Down
2 changes: 1 addition & 1 deletion llvm/test/Transforms/SimplifyCFG/switch-on-const-select.ll
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
; NOTE: Assertions have been autogenerated by utils/update_test_checks.py
; 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

; Test basic folding to a conditional branch.
define i32 @foo(i64 %x, i64 %y) nounwind {
Expand Down
2 changes: 1 addition & 1 deletion llvm/test/Transforms/SimplifyCFG/switch-profmd.ll
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
; RUN: opt -S -simplifycfg < %s | FileCheck %s
; RUN: opt -S -simplifycfg -simplifycfg-require-and-preserve-domtree=1 < %s | FileCheck %s

declare i32 @f(i32 %val)

Expand Down
2 changes: 1 addition & 1 deletion llvm/test/Transforms/SimplifyCFG/switch-range-to-icmp.ll
Original file line number Diff line number Diff line change
@@ -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 i32 @f(i32)

Expand Down
2 changes: 1 addition & 1 deletion llvm/test/Transforms/SimplifyCFG/switch-simplify-crash.ll
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
; RUN: opt < %s -simplifycfg -disable-output
; RUN: opt < %s -simplifycfg -simplifycfg-require-and-preserve-domtree=1 -disable-output

define void @NewExtractNames() {
entry:
Expand Down
2 changes: 1 addition & 1 deletion llvm/test/Transforms/SimplifyCFG/switch-to-icmp.ll
Original file line number Diff line number Diff line change
@@ -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 zeroext i1 @test1(i32 %x) nounwind readnone ssp noredzone {
entry:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
; RUN: opt < %s -simplifycfg -S | FileCheck %s
; RUN: opt < %s -simplifycfg -simplifycfg-require-and-preserve-domtree=1 -S | FileCheck %s

; int foo1_with_default(int a) {
; switch(a) {
Expand Down
2 changes: 1 addition & 1 deletion llvm/test/Transforms/SimplifyCFG/switch_switch_fold.ll
Original file line number Diff line number Diff line change
@@ -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

; Test that a switch going to a switch on the same value can be merged.
; All three switches in this example can be merged into one big one.
Expand Down
2 changes: 1 addition & 1 deletion llvm/test/Transforms/SimplifyCFG/switch_thread.ll
Original file line number Diff line number Diff line change
@@ -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

; Test that we can thread a simple known condition through switch statements.

Expand Down
2 changes: 1 addition & 1 deletion llvm/test/Transforms/SimplifyCFG/unreachable_assume.ll
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
; NOTE: Assertions have been autogenerated by utils/update_test_checks.py
; RUN: opt %s -simplifycfg -instcombine -S | FileCheck %s
; RUN: opt %s -simplifycfg -simplifycfg-require-and-preserve-domtree=1 -instcombine -S | FileCheck %s

define i32 @assume1(i32 %p) {
; CHECK-LABEL: @assume1(
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
; NOTE: Assertions have been autogenerated by utils/update_test_checks.py
; RUN: opt < %s -simplifycfg -S | FileCheck %s
; RUN: opt < %s -simplifycfg -phi-node-folding-threshold=2 -S | FileCheck %s
; RUN: opt < %s -simplifycfg -phi-node-folding-threshold=3 -S | FileCheck %s
; RUN: opt < %s -simplifycfg -simplifycfg-require-and-preserve-domtree=1 -S | FileCheck %s
; RUN: opt < %s -simplifycfg -simplifycfg-require-and-preserve-domtree=1 -phi-node-folding-threshold=2 -S | FileCheck %s
; RUN: opt < %s -simplifycfg -simplifycfg-require-and-preserve-domtree=1 -phi-node-folding-threshold=3 -S | FileCheck %s

; This is checking that the multiplication does overflow, with a leftover
; guard against division-by-zero that was needed before InstCombine
Expand Down
2 changes: 1 addition & 1 deletion llvm/test/Transforms/SimplifyCFG/wineh-unreachable.ll
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
; RUN: opt -S -simplifycfg < %s | FileCheck %s
; RUN: opt -S -simplifycfg -simplifycfg-require-and-preserve-domtree=1 < %s | FileCheck %s

declare void @Personality()
declare void @f()
Expand Down