2007-01-25 22:11:02 +00:00
|
|
|
; RUN: llvm-as < %s | llc -march=arm &&
|
|
|
|
; RUN: llvm-as < %s | llc -march=arm | grep bic | wc -l | grep 2 &&
|
|
|
|
; RUN: llvm-as < %s | llc -march=arm -mattr=+v6,+vfp2 &&
|
|
|
|
; RUN: llvm-as < %s | llc -march=arm -mattr=+v6,+vfp2 | grep fneg | wc -l | grep 2
|
2007-01-04 14:24:32 +00:00
|
|
|
|
2007-01-26 08:25:06 +00:00
|
|
|
define float @test1(float %x, double %y) {
|
2007-01-19 09:20:23 +00:00
|
|
|
%tmp = fpext float %x to double
|
2007-01-26 08:25:06 +00:00
|
|
|
%tmp2 = tail call double @copysign( double %tmp, double %y )
|
2007-01-19 09:20:23 +00:00
|
|
|
%tmp2 = fptrunc double %tmp2 to float
|
|
|
|
ret float %tmp2
|
2007-01-04 14:24:32 +00:00
|
|
|
}
|
|
|
|
|
2007-01-26 08:25:06 +00:00
|
|
|
define double @test2(double %x, float %y) {
|
2007-01-19 09:20:23 +00:00
|
|
|
%tmp = fpext float %y to double
|
2007-01-26 08:25:06 +00:00
|
|
|
%tmp2 = tail call double @copysign( double %x, double %tmp )
|
2007-01-19 09:20:23 +00:00
|
|
|
ret double %tmp2
|
|
|
|
}
|
2007-01-04 14:24:32 +00:00
|
|
|
|
2007-01-26 08:25:06 +00:00
|
|
|
declare double @copysign(double, double)
|