blob: 3e6ad54e73b3d187924424af08c682ee78ff4cb3 [file] [log] [blame]
Dan Gohmanf17a25c2007-07-18 16:29:46 +00001; RUN: llvm-as < %s | \
2; RUN: llc -mtriple=i686-apple-darwin8 -mcpu=yonah -march=x86 > %t
Dan Gohman8c89a502007-08-15 13:36:28 +00003; RUN: grep fldl %t | count 1
Dan Gohmanf17a25c2007-07-18 16:29:46 +00004; RUN: not grep xmm %t
Dan Gohman8c89a502007-08-15 13:36:28 +00005; RUN: grep {sub.*esp} %t | count 1
Dan Gohmanf17a25c2007-07-18 16:29:46 +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
15; 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