Chris Lattner | ff81ebf | 2009-03-18 00:43:52 +0000 | [diff] [blame] | 1 | ; RUN: llvm-as < %s | llc -march=x86 | grep {call.*12345678} |
Evan Cheng | 65cdee3 | 2009-05-20 01:11:00 +0000 | [diff] [blame^] | 2 | ; RUN: llvm-as < %s | llc -march=x86 -relocation-model=pic | not grep {call.*12345678} |
Chris Lattner | ff81ebf | 2009-03-18 00:43:52 +0000 | [diff] [blame] | 3 | |
| 4 | ; Call to immediate is not safe on x86-64 unless we *know* that the |
| 5 | ; call will be within 32-bits pcrel from the dest immediate. |
| 6 | |
| 7 | ; RUN: llvm-as < %s | llc -march=x86-64 | grep {call.*\*%rax} |
| 8 | |
Evan Cheng | 379e15e | 2009-03-12 23:01:35 +0000 | [diff] [blame] | 9 | ; PR3666 |
| 10 | ; PR3773 |
Evan Cheng | 65cdee3 | 2009-05-20 01:11:00 +0000 | [diff] [blame^] | 11 | ; rdar://6904453 |
Evan Cheng | 379e15e | 2009-03-12 23:01:35 +0000 | [diff] [blame] | 12 | |
| 13 | define i32 @main() nounwind { |
| 14 | entry: |
| 15 | %0 = call i32 inttoptr (i32 12345678 to i32 (i32)*)(i32 0) nounwind ; <i32> [#uses=1] |
| 16 | ret i32 %0 |
| 17 | } |