blob: 42cdb67cf5000f4fe7d4cde284b53e84c4ea35fd [file] [log] [blame]
Reid Spencer4575ab22007-04-15 23:00:46 +00001; RUN: llvm-as < %s | llc -mtriple=i686-apple-darwin8 -mcpu=yonah -march=x86 > %t
2; RUN: grep fldl %t | wc -l | grep 1
Chris Lattner113296b2007-02-25 09:30:03 +00003; RUN: not grep xmm %t &&
Reid Spencer4575ab22007-04-15 23:00:46 +00004; RUN: grep {sub.*esp} %t | wc -l | grep 1
Chris Lattnerf4acec12007-02-25 08:23:01 +00005
6; These testcases shouldn't require loading into an XMM register then storing
7; to memory, then reloading into an FPStack reg.
8
9define double @test1(double *%P) {
10 %A = load double* %P
11 ret double %A
12}
13
Chris Lattner113296b2007-02-25 09:30:03 +000014; fastcc should return a value
15define fastcc double @test2(<2 x double> %A) {
16 %B = extractelement <2 x double> %A, i32 0
17 ret double %B
18}
19
20define 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