1 ; We can't actually put attributes on intrinsic declarations, only on call sites.
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 define i32 @t(i32 %a) {
9 ; CHECK-INTERESTINGNESS: %r =
10 ; CHECK-INTERESTINGNESS-SAME: call
11 ; CHECK-INTERESTINGNESS-SAME: "arg0"
12 ; CHECK-INTERESTINGNESS-SAME: i32 @llvm.uadd.sat.i32(i32
13 ; CHECK-INTERESTINGNESS-SAME: "arg3"
14 ; CHECK-INTERESTINGNESS-SAME: %a
15 ; CHECK-INTERESTINGNESS-SAME: i32
16 ; CHECK-INTERESTINGNESS-SAME: %a
17 ; CHECK-INTERESTINGNESS-SAME: #1
19 ; CHECK-FINAL: %r = call "arg0" i32 @llvm.uadd.sat.i32(i32 "arg3" %a, i32 %a) #1
20 ; CHECK-ALL: ret i32 %r
22 %r = call "arg0" "arg1" i32 @llvm.uadd.sat.i32(i32 "arg2" "arg3" %a, i32 %a) "arg4" "arg5"
26 ; CHECK-ALL: declare i32 @llvm.uadd.sat.i32(i32, i32) #0
27 declare i32 @llvm.uadd.sat.i32(i32, i32) #0
29 ; CHECK-ALL: attributes #0 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
31 ; CHECK-INTERESTINGNESS: attributes #1 = {
32 ; CHECK-INTERESTINGNESS-SAME: "arg4"
34 ; CHECK-FINAL: attributes #1 = { "arg4" }
36 ; CHECK-ALL-NOT: attributes #
38 attributes #0 = { "arg6" "arg7" }