brintos

brintos / llvm-project-archived public Read only

0
0
Text · 1.5 KiB · e70119a Raw
41 lines · plain
1; Test that llvm-reduce can remove uninteresting operand bundles from calls.2;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 %t4; RUN: cat %t | FileCheck --check-prefixes=CHECK-ALL,CHECK-FINAL %s5 6; CHECK-ALL: declare void @f1()7; CHECK-ALL: declare void @f2()8; CHECK-ALL: declare void @f3()9declare void @f1()10declare void @f2()11declare void @f3()12 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 void19; CHECK-FINAL-NEXT:  }20define void @interesting(i32 %arg0, i32 %arg1, i32 %arg2) {21entry:22; CHECK-INTERESTINGNESS-LABEL: @interesting(23 24; CHECK-INTERESTINGNESS: call void @f1()25; CHECK-INTERESTINGNESS: "bundle0"()26; CHECK-INTERESTINGNESS: "align"(i32 %arg0)27; CHECK-INTERESTINGNESS: "whatever0"()28 29; CHECK-INTERESTINGNESS: call void @f2()30 31; CHECK-INTERESTINGNESS: call void @f3()32; CHECK-INTERESTINGNESS: "align"(i32 %arg2)33 34; CHECK-INTERESTINGNESS: ret35 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) ]39  ret void40}41