blob: ddc0faeea60083109066d369b1cec3f6d3b36524 [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
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)