Matt Arsenault | ea376da | 2017-04-28 20:25:27 +0000 | [diff] [blame] | 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 | |
| 6 | declare i32 @speculatable() #0 |
| 7 | |
| 8 | ; Make sure this the attribute is accepted on the call site if the |
| 9 | ; declaration matches. |
| 10 | define i32 @call_speculatable() { |
| 11 | %ret = call i32 @speculatable() #0 |
| 12 | ret i32 %ret |
| 13 | } |
| 14 | |
| 15 | define float @call_bitcast_speculatable() { |
| 16 | %ret = call float bitcast (i32()* @speculatable to float()*)() #0 |
| 17 | ret float %ret |
| 18 | } |
| 19 | |
| 20 | attributes #0 = { speculatable } |