Convert more tests to avoid llvm-as.
[oota-llvm.git] / test / CodeGen / X86 / fp-stack-ret.ll
1 ; RUN: llc < %s -mtriple=i686-apple-darwin8 -mcpu=yonah -march=x86 > %t
2 ; RUN: grep fldl %t | count 1
3 ; RUN: not grep xmm %t
4 ; RUN: grep {sub.*esp} %t | count 1
5
6 ; These testcases shouldn't require loading into an XMM register then storing 
7 ; to memory, then reloading into an FPStack reg.
8
9 define double @test1(double *%P) {
10         %A = load double* %P
11         ret double %A
12 }
13
14 ; fastcc should return a value 
15 define fastcc double @test2(<2 x double> %A) {
16         %B = extractelement <2 x double> %A, i32 0
17         ret double %B
18 }
19
20 define fastcc double @test3(<4 x float> %A) {
21         %B = bitcast <4 x float> %A to <2 x double>
22         %C = call fastcc double @test2(<2 x double> %B)
23         ret double %C
24 }
25