2009-09-09 08:09:15 +08:00
|
|
|
; RUN: llc < %s -march=arm | grep bic | count 2
|
|
|
|
; RUN: llc < %s -march=arm -mattr=+v6,+vfp2 | \
|
2007-08-15 21:36:28 +08:00
|
|
|
; RUN: grep fneg | count 2
|
2007-01-04 22:24:32 +08:00
|
|
|
|
2007-01-26 16:25:06 +08:00
|
|
|
define float @test1(float %x, double %y) {
|
2007-01-19 17:20:23 +08:00
|
|
|
%tmp = fpext float %x to double
|
2007-01-26 16:25:06 +08:00
|
|
|
%tmp2 = tail call double @copysign( double %tmp, double %y )
|
2007-01-31 00:16:01 +08:00
|
|
|
%tmp3 = fptrunc double %tmp2 to float
|
|
|
|
ret float %tmp3
|
2007-01-04 22:24:32 +08:00
|
|
|
}
|
|
|
|
|
2007-01-26 16:25:06 +08:00
|
|
|
define double @test2(double %x, float %y) {
|
2007-01-19 17:20:23 +08:00
|
|
|
%tmp = fpext float %y to double
|
2007-01-26 16:25:06 +08:00
|
|
|
%tmp2 = tail call double @copysign( double %x, double %tmp )
|
2007-01-19 17:20:23 +08:00
|
|
|
ret double %tmp2
|
|
|
|
}
|
2007-01-04 22:24:32 +08:00
|
|
|
|
2007-01-26 16:25:06 +08:00
|
|
|
declare double @copysign(double, double)
|