2007-01-05 16:45:06 +00:00
|
|
|
; RUN: llvm-as < %s | llc -march=x86 -mattr=+sse2 &&
|
|
|
|
; RUN: llvm-as < %s | llc -march=x86 -mattr=+sse2 | not getp test
|
2007-01-05 08:12:59 +00:00
|
|
|
|
2007-01-26 08:25:06 +00:00
|
|
|
define float @test1(float %a, float %b) {
|
|
|
|
%tmp = tail call float @copysignf( float %b, float %a )
|
2007-01-05 08:12:59 +00:00
|
|
|
ret float %tmp
|
|
|
|
}
|
|
|
|
|
2007-01-26 08:25:06 +00:00
|
|
|
define double @test2(double %a, float %b, float %c) {
|
2007-01-05 08:12:59 +00:00
|
|
|
%tmp1 = add float %b, %c
|
|
|
|
%tmp2 = fpext float %tmp1 to double
|
2007-01-26 08:25:06 +00:00
|
|
|
%tmp = tail call double @copysign( double %a, double %tmp2 )
|
2007-01-05 08:12:59 +00:00
|
|
|
ret double %tmp
|
|
|
|
}
|
|
|
|
|
2007-01-26 08:25:06 +00:00
|
|
|
declare float @copysignf(float, float)
|
|
|
|
declare double @copysign(double, double)
|