1 ; RUN: llc -mtriple=powerpc64-unknown-linux-gnu -mcpu=pwr7 < %s | FileCheck %s
2 target datalayout = "E-p:64:64:64-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64-f32:32:32-f64:64:64-f128:128:128-v128:128:128-n32:64"
3 target triple = "powerpc64-unknown-linux-gnu"
5 define double @foo_dd(double %a, double %b) #0 {
7 %call = tail call double @copysign(double %a, double %b) #0
10 ; CHECK-LABEL: @foo_dd
11 ; CHECK: fcpsgn 1, 2, 1
15 declare double @copysign(double, double) #0
17 define float @foo_ss(float %a, float %b) #0 {
19 %call = tail call float @copysignf(float %a, float %b) #0
22 ; CHECK-LABEL: @foo_ss
23 ; CHECK: fcpsgn 1, 2, 1
27 declare float @copysignf(float, float) #0
29 define float @foo_sd(float %a, double %b) #0 {
31 %conv = fptrunc double %b to float
32 %call = tail call float @copysignf(float %a, float %conv) #0
35 ; CHECK-LABEL: @foo_sd
36 ; CHECK: fcpsgn 1, 2, 1
40 define double @foo_ds(double %a, float %b) #0 {
42 %conv = fpext float %b to double
43 %call = tail call double @copysign(double %a, double %conv) #0
46 ; CHECK-LABEL: @foo_ds
47 ; CHECK: fcpsgn 1, 2, 1
51 attributes #0 = { nounwind readnone }