blob: 12ea32cc4ea57e0e0a293d2b3e6a8ecc20a72206 [file] [log] [blame]
Evan Cheng02b985c2007-01-19 09:20:23 +00001; RUN: llvm-as < fcopysign.ll | llc -march=arm &&
2; RUN: llvm-as < fcopysign.ll | llc -march=arm | grep bic | wc -l | grep 2 &&
3; RUN: llvm-as < fcopysign.ll | llc -march=arm -mattr=+v6,+vfp2 &&
4; RUN: llvm-as < fcopysign.ll | llc -march=arm -mattr=+v6,+vfp2 | grep fneg | wc -l | grep 2
Lauro Ramos Venancio4c6676c2007-01-04 14:24:32 +00005
Evan Cheng02b985c2007-01-19 09:20:23 +00006define float %test1(float %x, double %y) {
7 %tmp = fpext float %x to double
8 %tmp2 = tail call double %copysign( double %tmp, double %y )
9 %tmp2 = fptrunc double %tmp2 to float
10 ret float %tmp2
Lauro Ramos Venancio4c6676c2007-01-04 14:24:32 +000011}
12
Evan Cheng02b985c2007-01-19 09:20:23 +000013define double %test2(double %x, float %y) {
14 %tmp = fpext float %y to double
15 %tmp2 = tail call double %copysign( double %x, double %tmp )
16 ret double %tmp2
17}
Lauro Ramos Venancio4c6676c2007-01-04 14:24:32 +000018
Evan Cheng02b985c2007-01-19 09:20:23 +000019declare double %copysign(double, double)