blob: 3857fb157905fbfe846f618c72a870e0ae874c41 [file] [log] [blame]
Duncan Sands7d2568c2010-05-07 17:03:48 +00001; RUN: llc < %s -mtriple=i386-apple-darwin -relocation-model=static | grep {call.*12345678}
2; RUN: llc < %s -mtriple=i386-apple-darwin -relocation-model=pic | not grep {call.*12345678}
Dan Gohman36a09472009-09-08 23:54:48 +00003; RUN: llc < %s -mtriple=i386-pc-linux -relocation-model=dynamic-no-pic | grep {call.*12345678}
Chris Lattnerff81ebf2009-03-18 00:43:52 +00004
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
Stuart Hastingsb8846662010-08-04 15:31:35 +00008; RUN: llc < %s -march=x86-64 | grep {call.*\\*%rax}
Chris Lattnerff81ebf2009-03-18 00:43:52 +00009
Evan Cheng379e15e2009-03-12 23:01:35 +000010; PR3666
11; PR3773
Evan Cheng65cdee32009-05-20 01:11:00 +000012; rdar://6904453
Evan Cheng379e15e2009-03-12 23:01:35 +000013
14define i32 @main() nounwind {
15entry:
16 %0 = call i32 inttoptr (i32 12345678 to i32 (i32)*)(i32 0) nounwind ; <i32> [#uses=1]
17 ret i32 %0
18}