f7dbe6e2c224ed61b66970e62b513283b52cf1d1
[oota-llvm.git] / test / CodeGen / X86 / fast-isel-x86.ll
1 ; RUN: llc -march=x86 -relocation-model=pic
2
3 ; This should use flds to set the return value.
4 ; CHECK: test0:
5 ; CHECK: flds
6 ; CHECK: ret
7 @G = external global float
8 define float @test0() nounwind {
9   %t = load float* @G
10   ret float %t
11 }
12
13 ; This should pop 4 bytes on return.
14 ; CHECK: test1:
15 ; CHECK: ret $4
16 define void @test1({i32, i32, i32, i32}* sret %p) nounwind {
17   store {i32, i32, i32, i32} zeroinitializer, {i32, i32, i32, i32}* %p
18   ret void
19 }
20
21 ; Properly initialize the pic base.
22 ; CHECK: test2:
23 ; CHECK-NOT: HHH
24 ; CHECK: call{{.*}}L2$pb
25 ; CHECK-NEXT: L2$pb:
26 ; CHECK-NEXT: pop
27 ; CHECK: HHH
28 ; CHECK: ret
29 @HHH = external global i32
30 define i32 @test2() nounwind {
31   %t = load i32* @H
32   ret i32 %t
33 }