41 lines · plain
1; RUN: llc < %s -mtriple=i686-apple-darwin8 -mcpu=yonah | FileCheck %s2 3; These testcases shouldn't require loading into an XMM register then storing 4; to memory, then reloading into an FPStack reg.5 6; CHECK: test17; CHECK: fldl8; CHECK-NEXT: ret9define double @test1(ptr%P) {10 %A = load double, ptr %P11 ret double %A12}13 14; fastcc should return a value15; CHECK: test216; CHECK-NOT: xmm17; CHECK: ret18define fastcc double @test2(<2 x double> %A) {19 %B = extractelement <2 x double> %A, i32 020 ret double %B21}22 23; CHECK: test324; CHECK: sub{{.*}}%esp25; CHECK-NOT: xmm26define fastcc double @test3(<4 x float> %A) {27 %B = bitcast <4 x float> %A to <2 x double>28 %C = call fastcc double @test2(<2 x double> %B)29 ret double %C30}31 32; Clear the stack when not using a return value.33; CHECK: test434; CHECK: call35; CHECK: fstp36; CHECK: ret37define void @test4(ptr%P) {38 %A = call double @test1(ptr%P)39 ret void40}41