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