1 ; Test that llvm-reduce can remove uninteresting operand bundles from calls.
3 ; RUN: llvm-reduce --abort-on-invalid-reduction --test FileCheck --test-arg --check-prefixes=CHECK-ALL,CHECK-INTERESTINGNESS --test-arg %s --test-arg --input-file %s -o %t
4 ; RUN: cat %t | FileCheck --check-prefixes=CHECK-ALL,CHECK-FINAL %s
6 ; CHECK-ALL: declare void @f1()
7 ; CHECK-ALL: declare void @f2()
8 ; CHECK-ALL: declare void @f3()
13 ; CHECK-FINAL-LABEL: define void @interesting(i32 %arg0, i32 %arg2) {
14 ; CHECK-FINAL-NEXT: entry:
15 ; CHECK-FINAL-NEXT: call void @f1() [ "bundle0"(), "align"(i32 %arg0), "whatever0"() ]
16 ; CHECK-FINAL-NEXT: call void @f2()
17 ; CHECK-FINAL-NEXT: call void @f3() [ "align"(i32 %arg2) ]
18 ; CHECK-FINAL-NEXT: ret void
20 define void @interesting(i32 %arg0, i32 %arg1, i32 %arg2) {
22 ; CHECK-INTERESTINGNESS-LABEL: @interesting(
24 ; CHECK-INTERESTINGNESS: call void @f1()
25 ; CHECK-INTERESTINGNESS: "bundle0"()
26 ; CHECK-INTERESTINGNESS: "align"(i32 %arg0)
27 ; CHECK-INTERESTINGNESS: "whatever0"()
29 ; CHECK-INTERESTINGNESS: call void @f2()
31 ; CHECK-INTERESTINGNESS: call void @f3()
32 ; CHECK-INTERESTINGNESS: "align"(i32 %arg2)
34 ; CHECK-INTERESTINGNESS: ret
36 call void @f1() [ "bundle0"(), "align"(i32 %arg0), "whatever0"() ]
37 call void @f2() [ "align"(i32 %arg1), "whatever1"(), "bundle1"() ]
38 call void @f3() [ "whatever2"(), "bundle2"(), "align"(i32 %arg2) ]