1 ; RUN: not llvm-as %s -o /dev/null 2>&1 | FileCheck %s
3 ; Make sure that speculatable is not allowed on a call site if the
4 ; declaration is not also speculatable.
6 declare i32 @not_speculatable()
8 ; CHECK: speculatable attribute may not apply to call sites
9 ; CHECK-NEXT: %ret = call i32 @not_speculatable() #0
10 define i32 @call_not_speculatable() {
11 %ret = call i32 @not_speculatable() #0
15 @gv = internal unnamed_addr constant i32 0
17 ; CHECK: speculatable attribute may not apply to call sites
18 ; CHECK-NEXT: %ret = call float @gv() #0
19 define float @call_bitcast_speculatable() {
20 %ret = call float @gv() #0
24 attributes #0 = { speculatable }