blob: a6d741087a8955ee9537f1f149b68e6f86c034b3 [file] [log] [blame]
Dan Gohmanfce288f2009-09-09 00:09:15 +00001; RUN: llc < %s -march=arm | grep bic | count 2
2; RUN: llc < %s -march=arm -mattr=+v6,+vfp2 | \
Jim Grosbache5165492009-11-09 00:11:35 +00003; RUN: grep vneg | count 2
Lauro Ramos Venancio4c6676c2007-01-04 14:24:32 +00004
Reid Spencere3ff5ad2007-01-26 08:25:06 +00005define float @test1(float %x, double %y) {
Evan Cheng02b985c2007-01-19 09:20:23 +00006 %tmp = fpext float %x to double
Reid Spencere3ff5ad2007-01-26 08:25:06 +00007 %tmp2 = tail call double @copysign( double %tmp, double %y )
Reid Spencer90850432007-01-30 16:16:01 +00008 %tmp3 = fptrunc double %tmp2 to float
9 ret float %tmp3
Lauro Ramos Venancio4c6676c2007-01-04 14:24:32 +000010}
11
Reid Spencere3ff5ad2007-01-26 08:25:06 +000012define double @test2(double %x, float %y) {
Evan Cheng02b985c2007-01-19 09:20:23 +000013 %tmp = fpext float %y to double
Reid Spencere3ff5ad2007-01-26 08:25:06 +000014 %tmp2 = tail call double @copysign( double %x, double %tmp )
Evan Cheng02b985c2007-01-19 09:20:23 +000015 ret double %tmp2
16}
Lauro Ramos Venancio4c6676c2007-01-04 14:24:32 +000017
Reid Spencere3ff5ad2007-01-26 08:25:06 +000018declare double @copysign(double, double)