1 ; Test that llvm-reduce can remove uninteresting Basic Blocks, and remove them from instructions (i.e. SwitchInst, BranchInst and IndirectBrInst)
2 ; Note: if an uninteresting BB is the default case for a switch, the instruction is removed altogether (since the default case cannot be replaced)
4 ; RUN: llvm-reduce -abort-on-invalid-reduction --delta-passes=basic-blocks --test FileCheck --test-arg --check-prefix=CHECK-INTERESTINGNESS --test-arg %s --test-arg --input-file %s -o %t
5 ; RUN: FileCheck -implicit-check-not=uninteresting %s < %t
7 ; CHECK-INTERESTINGNESS: store i32 0
8 ; CHECK-INTERESTINGNESS: store i32 1
9 ; CHECK-INTERESTINGNESS: store i32 2
14 ; CHECK-NOT: switch i32 0, label %uninteresting
15 switch i32 0, label %uninteresting [
16 i32 1, label %interesting2
24 ; CHECK: switch i32 1, label %interesting3
25 switch i32 1, label %interesting3 [
26 ; CHECK-NOT: i32 0, label %uninteresting
27 i32 0, label %uninteresting
28 ; CHECK: i32 1, label %interesting3
29 i32 1, label %interesting3
34 ; CHECK: br label %interesting2
35 br i1 true, label %interesting2, label %uninteresting