[Frontend] Remove unused includes (NFC) (#116927)
[llvm-project.git] / llvm / test / tools / llvm-reduce / remove-call-site-attributes.ll
blobcf15b0b3133f2fef672c29624df978cb5de24296
1 ; Test that llvm-reduce can remove uninteresting operand bundles from calls.
3 ; RUN: llvm-reduce -abort-on-invalid-reduction --delta-passes=operand-bundles,attributes --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 i32 @f1(i32, i32)
7 declare i32 @f1(i32, i32)
9 ; CHECK-FINAL-LABEL: define i32 @interesting(i32 %arg0, i32 %arg1) {
10 ; CHECK-FINAL-NEXT:  entry:
11 ; CHECK-FINAL-NEXT:    %r = call "attr0" i32 @f1(i32 "attr4" %arg0, i32 %arg1) #0
12 ; CHECK-FINAL-NEXT:    ret i32 %r
13 ; CHECK-FINAL-NEXT:  }
14 define i32 @interesting(i32 %arg0, i32 %arg1) {
15 entry:
16 ; CHECK-INTERESTINGNESS-LABEL: @interesting(
18 ; CHECK-INTERESTINGNESS: %r = call
19 ; CHECK-INTERESTINGNESS-SAME: "attr0"
20 ; CHECK-INTERESTINGNESS-SAME: i32 @f1(
21 ; CHECK-INTERESTINGNESS-SAME: i32
22 ; CHECK-INTERESTINGNESS-SAME: "attr4"
23 ; CHECK-INTERESTINGNESS-SAME: %arg0
24 ; CHECK-INTERESTINGNESS-SAME: i32
25 ; CHECK-INTERESTINGNESS-SAME: %arg1
26 ; CHECK-INTERESTINGNESS-SAME: #0
27 ; CHECK-INTERESTINGNESS: ret i32 %r
29   %r = call "attr0" "attr1" "attr2" i32 @f1(i32 "attr3" "attr4" "attr5" %arg0, i32 "attr6" "attr7" "attr8" %arg1) #0
30   ret i32 %r
33 ; CHECK-INTERESTINGNESS: attributes #0 = {
34 ; CHECK-INTERESTINGNESS-SAME: "attr10"
36 ; CHECK-FINAL:  attributes #0 = { "attr10" }
38 attributes #0 = { "attr9" "attr10" "attr11" }