2007-04-16 14:17:04 +00:00
|
|
|
; RUN: llvm-as < %s | \
|
|
|
|
; RUN: llc -mtriple=i686-apple-darwin8 -mcpu=yonah -march=x86 > %t
|
2007-04-15 23:00:46 +00:00
|
|
|
; RUN: grep fldl %t | wc -l | grep 1
|
2007-04-16 17:36:08 +00:00
|
|
|
; RUN: not grep xmm %t
|
2007-04-15 23:00:46 +00:00
|
|
|
; RUN: grep {sub.*esp} %t | wc -l | grep 1
|
2007-02-25 08:23:01 +00:00
|
|
|
|
|
|
|
; These testcases shouldn't require loading into an XMM register then storing
|
|
|
|
; to memory, then reloading into an FPStack reg.
|
|
|
|
|
|
|
|
define double @test1(double *%P) {
|
|
|
|
%A = load double* %P
|
|
|
|
ret double %A
|
|
|
|
}
|
|
|
|
|
2007-02-25 09:30:03 +00:00
|
|
|
; fastcc should return a value
|
|
|
|
define fastcc double @test2(<2 x double> %A) {
|
|
|
|
%B = extractelement <2 x double> %A, i32 0
|
|
|
|
ret double %B
|
|
|
|
}
|
|
|
|
|
|
|
|
define fastcc double @test3(<4 x float> %A) {
|
|
|
|
%B = bitcast <4 x float> %A to <2 x double>
|
|
|
|
%C = call fastcc double @test2(<2 x double> %B)
|
|
|
|
ret double %C
|
|
|
|
}
|
|
|
|
|