blob: b384f36a5c14fe949a092e23b853515f4d3275e0 [file] [log] [blame]
Lauro Ramos Venanciob5c595c2007-01-25 22:11:02 +00001; RUN: llvm-as < %s | llc -march=arm &&
2; RUN: llvm-as < %s | llc -march=arm | grep bic | wc -l | grep 2 &&
3; RUN: llvm-as < %s | llc -march=arm -mattr=+v6,+vfp2 &&
4; RUN: llvm-as < %s | llc -march=arm -mattr=+v6,+vfp2 | grep fneg | wc -l | grep 2
Lauro Ramos Venancio8c45da02007-01-04 14:24:32 +00005
Reid Spencerce380562007-01-26 08:25:06 +00006define float @test1(float %x, double %y) {
Evan Chenga5007fa2007-01-19 09:20:23 +00007 %tmp = fpext float %x to double
Reid Spencerce380562007-01-26 08:25:06 +00008 %tmp2 = tail call double @copysign( double %tmp, double %y )
Reid Spenceraf6a4082007-01-30 16:16:01 +00009 %tmp3 = fptrunc double %tmp2 to float
10 ret float %tmp3
Lauro Ramos Venancio8c45da02007-01-04 14:24:32 +000011}
12
Reid Spencerce380562007-01-26 08:25:06 +000013define double @test2(double %x, float %y) {
Evan Chenga5007fa2007-01-19 09:20:23 +000014 %tmp = fpext float %y to double
Reid Spencerce380562007-01-26 08:25:06 +000015 %tmp2 = tail call double @copysign( double %x, double %tmp )
Evan Chenga5007fa2007-01-19 09:20:23 +000016 ret double %tmp2
17}
Lauro Ramos Venancio8c45da02007-01-04 14:24:32 +000018
Reid Spencerce380562007-01-26 08:25:06 +000019declare double @copysign(double, double)