xref: /llvm-project/llvm/test/Verifier/speculatable-callsite.ll (revision c820f2a43eaba02db97c4ff60c58a58e6bdd391d)
1; RUN: llvm-as %s -o /dev/null
2
3; Make sure speculatable is accepted on a call site if the declaration
4; is also speculatable.
5
6declare i32 @speculatable() #0
7
8; Make sure this the attribute is accepted on the call site if the
9; declaration matches.
10define i32 @call_speculatable() {
11  %ret = call i32 @speculatable() #0
12  ret i32 %ret
13}
14
15define float @call_bitcast_speculatable() {
16  %ret = call float @speculatable() #0
17  ret float %ret
18}
19
20attributes #0 = { speculatable }
21