1; We can't actually put attributes on intrinsic declarations, only on call sites. 2; 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 5 6define i32 @t(i32 %a) { 7; CHECK-ALL-LABEL: @t( 8 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 18 19; CHECK-FINAL: %r = call "arg0" i32 @llvm.uadd.sat.i32(i32 "arg3" %a, i32 %a) #1 20; CHECK-ALL: ret i32 %r 21 22 %r = call "arg0" "arg1" i32 @llvm.uadd.sat.i32(i32 "arg2" "arg3" %a, i32 %a) "arg4" "arg5" 23 ret i32 %r 24} 25 26; CHECK-ALL: declare i32 @llvm.uadd.sat.i32(i32, i32) #0 27declare i32 @llvm.uadd.sat.i32(i32, i32) #0 28 29; CHECK-ALL: attributes #0 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) } 30 31; CHECK-INTERESTINGNESS: attributes #1 = { 32; CHECK-INTERESTINGNESS-SAME: "arg4" 33 34; CHECK-FINAL: attributes #1 = { "arg4" } 35 36; CHECK-ALL-NOT: attributes # 37 38attributes #0 = { "arg6" "arg7" } 39