[docs] Add LICENSE.txt to the root of the mono-repo
[llvm-project.git] / llvm / test / tools / llvm-reduce / remove-attributes-from-intrinsic-like-functions.ll
blob60df12e94feb266503540047f7947ef43fbdf564
1 ; Just because a function is named like an intrinsic does not mean we should skip it's attributes.
3 ; RUN: llvm-reduce --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 @llvm.not.really.an.intrinsic(i32, i32) #0
7 declare i32 @llvm.not.really.an.intrinsic(i32, i32) #0
9 define i32 @t(i32 %a) {
10 ; CHECK-ALL-LABEL: @t(
12 ; CHECK-INTERESTINGNESS: %r =
13 ; CHECK-INTERESTINGNESS-SAME: call
14 ; CHECK-INTERESTINGNESS-SAME: "arg0"
15 ; CHECK-INTERESTINGNESS-SAME: i32 @llvm.not.really.an.intrinsic(i32
16 ; CHECK-INTERESTINGNESS-SAME: "arg3"
17 ; CHECK-INTERESTINGNESS-SAME: %a
18 ; CHECK-INTERESTINGNESS-SAME: i32
19 ; CHECK-INTERESTINGNESS-SAME: %a
20 ; CHECK-INTERESTINGNESS-SAME: #1
22 ; CHECK-FINAL: %r = call "arg0" i32 @llvm.not.really.an.intrinsic(i32 "arg3" %a, i32 %a) #1
23 ; CHECK-ALL: ret i32 %r
25   %r = call "arg0" "arg1" i32 @llvm.not.really.an.intrinsic(i32 "arg2" "arg3" %a, i32 %a) "arg4" "arg5"
26   ret i32 %r
29 ; CHECK-INTERESTINGNESS: attributes #0 = {
30 ; CHECK-INTERESTINGNESS-SAME: "arg6"
32 ; CHECK-INTERESTINGNESS: attributes #1 = {
33 ; CHECK-INTERESTINGNESS-SAME: "arg4"
35 ; CHECK-FINAL: attributes #0 = { "arg6" }
36 ; CHECK-FINAL: attributes #1 = { "arg4" }
38 ; CHECK-ALL-NOT: attributes #
40 attributes #0 = { "arg6" "arg7" }