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" 4 5 define double @foo_dd(double %a, double %b) #0 { 6 entry: 7 %call = tail call double @copysign(double %a, double %b) #0 8 ret double %call 9 10 ; CHECK-LABEL: @foo_dd 11 ; CHECK: fcpsgn 1, 2, 1 12 ; CHECK: blr 13 } 14 15 declare double @copysign(double, double) #0 16 17 define float @foo_ss(float %a, float %b) #0 { 18 entry: 19 %call = tail call float @copysignf(float %a, float %b) #0 20 ret float %call 21 22 ; CHECK-LABEL: @foo_ss 23 ; CHECK: fcpsgn 1, 2, 1 24 ; CHECK: blr 25 } 26 27 declare float @copysignf(float, float) #0 28 29 define float @foo_sd(float %a, double %b) #0 { 30 entry: 31 %conv = fptrunc double %b to float 32 %call = tail call float @copysignf(float %a, float %conv) #0 33 ret float %call 34 35 ; CHECK-LABEL: @foo_sd 36 ; CHECK: fcpsgn 1, 2, 1 37 ; CHECK: blr 38 } 39 40 define double @foo_ds(double %a, float %b) #0 { 41 entry: 42 %conv = fpext float %b to double 43 %call = tail call double @copysign(double %a, double %conv) #0 44 ret double %call 45 46 ; CHECK-LABEL: @foo_ds 47 ; CHECK: fcpsgn 1, 2, 1 48 ; CHECK: blr 49 } 50 51 attributes #0 = { nounwind readnone } 52 53