blob: 73c6670bfc491df96eea088a47426cb5bcc3c254 [file] [log] [blame]
Lauro Ramos Venanciob9329e02007-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 Venancio4c6676c2007-01-04 14:24:32 +00005
Reid Spencere3ff5ad2007-01-26 08:25:06 +00006define float @test1(float %x, double %y) {
Evan Cheng02b985c2007-01-19 09:20:23 +00007 %tmp = fpext float %x to double
Reid Spencere3ff5ad2007-01-26 08:25:06 +00008 %tmp2 = tail call double @copysign( double %tmp, double %y )
Evan Cheng02b985c2007-01-19 09:20:23 +00009 %tmp2 = fptrunc double %tmp2 to float
10 ret float %tmp2
Lauro Ramos Venancio4c6676c2007-01-04 14:24:32 +000011}
12
Reid Spencere3ff5ad2007-01-26 08:25:06 +000013define double @test2(double %x, float %y) {
Evan Cheng02b985c2007-01-19 09:20:23 +000014 %tmp = fpext float %y to double
Reid Spencere3ff5ad2007-01-26 08:25:06 +000015 %tmp2 = tail call double @copysign( double %x, double %tmp )
Evan Cheng02b985c2007-01-19 09:20:23 +000016 ret double %tmp2
17}
Lauro Ramos Venancio4c6676c2007-01-04 14:24:32 +000018
Reid Spencere3ff5ad2007-01-26 08:25:06 +000019declare double @copysign(double, double)