Chris Lattner | 113296b | 2007-02-25 09:30:03 +0000 | [diff] [blame^] | 1 | ; RUN: llvm-as < %s | llc -mtriple=i686-apple-darwin8 -mcpu=yonah -march=x86 > %t && |
| 2 | ; RUN: grep fldl %t | wc -l | grep 1 && |
| 3 | ; RUN: not grep xmm %t && |
| 4 | ; RUN: grep 'sub.*esp' %t | wc -l | grep 1 |
Chris Lattner | f4acec1 | 2007-02-25 08:23:01 +0000 | [diff] [blame] | 5 | |
| 6 | ; These testcases shouldn't require loading into an XMM register then storing |
| 7 | ; to memory, then reloading into an FPStack reg. |
| 8 | |
| 9 | define double @test1(double *%P) { |
| 10 | %A = load double* %P |
| 11 | ret double %A |
| 12 | } |
| 13 | |
Chris Lattner | 113296b | 2007-02-25 09:30:03 +0000 | [diff] [blame^] | 14 | ; fastcc should return a value |
| 15 | define fastcc double @test2(<2 x double> %A) { |
| 16 | %B = extractelement <2 x double> %A, i32 0 |
| 17 | ret double %B |
| 18 | } |
| 19 | |
| 20 | define 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 | |