xref: /llvm-project/llvm/test/tools/llvm-reduce/simplify-cfg.ll (revision 5a1f864e89ab4a8e43fd12c9ee590b6c4558deb7)
1; RUN: llvm-reduce --delta-passes=simplify-cfg --test %python --test-arg %p/Inputs/remove-bbs.py -abort-on-invalid-reduction %s -o %t
2
3; RUN: FileCheck --check-prefix=CHECK-FINAL %s --input-file=%t
4; CHECK-FINAL: @f1
5; CHECK-FINAL-NOT: x6:
6; CHECK-FINAL-NOT: x10:
7
8define void @f1(ptr %interesting3, i32 %interesting2) {
9  %x3 = alloca ptr, i32 0, align 8
10  store ptr %interesting3, ptr %interesting3, align 8
11  switch i32 %interesting2, label %interesting1 [
12    i32 0, label %x6
13    i32 1, label %x11
14  ]
15
16x4:
17  %x5 = call ptr @f2()
18  br label %x10
19
20x10:
21  br label %interesting1
22
23x6:
24  br label %x11
25
26x11:
27  br label %interesting1
28
29interesting1:
30  ret void
31}
32
33declare ptr @f2()
34