25 lines · plain
1; RUN: not llvm-as %s -o /dev/null 2>&1 | FileCheck %s2 3; Make sure that speculatable is not allowed on a call site if the4; declaration is not also speculatable.5 6declare i32 @not_speculatable()7 8; CHECK: speculatable attribute may not apply to call sites9; CHECK-NEXT: %ret = call i32 @not_speculatable() #010define i32 @call_not_speculatable() {11 %ret = call i32 @not_speculatable() #012 ret i32 %ret13}14 15@gv = internal unnamed_addr constant i32 016 17; CHECK: speculatable attribute may not apply to call sites18; CHECK-NEXT: %ret = call float @gv() #019define float @call_bitcast_speculatable() {20 %ret = call float @gv() #021 ret float %ret22}23 24attributes #0 = { speculatable }25