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