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