1*9880d681SAndroid Build Coastguard Worker; RUN: llc < %s -mtriple=x86_64-darwin | FileCheck %s 2*9880d681SAndroid Build Coastguard Worker 3*9880d681SAndroid Build Coastguard Worker; CHECK-LABEL: LCPI0_0: 4*9880d681SAndroid Build Coastguard Worker; CHECK-NEXT: .long 4286578688 5*9880d681SAndroid Build Coastguard Worker; CHECK-LABEL: LCPI0_1: 6*9880d681SAndroid Build Coastguard Worker; CHECK-NEXT: .long 2139095040 7*9880d681SAndroid Build Coastguard Worker 8*9880d681SAndroid Build Coastguard Worker; CHECK-LABEL: foo: 9*9880d681SAndroid Build Coastguard Worker; CHECK: testb $-128, -15(%rsp) 10*9880d681SAndroid Build Coastguard Worker; CHECK: flds LCPI0_0(%rip) 11*9880d681SAndroid Build Coastguard Worker; CHECK: flds LCPI0_1(%rip) 12*9880d681SAndroid Build Coastguard Worker; CHECK: fcmovne %st(1), %st(0) 13*9880d681SAndroid Build Coastguard Worker; CHECK: fstp %st(1) 14*9880d681SAndroid Build Coastguard Worker; CHECK: retq 15*9880d681SAndroid Build Coastguard Workerdefine x86_fp80 @foo(x86_fp80 %a) { 16*9880d681SAndroid Build Coastguard Worker %1 = tail call x86_fp80 @copysignl(x86_fp80 0xK7FFF8000000000000000, x86_fp80 %a) nounwind readnone 17*9880d681SAndroid Build Coastguard Worker ret x86_fp80 %1 18*9880d681SAndroid Build Coastguard Worker} 19*9880d681SAndroid Build Coastguard Worker 20*9880d681SAndroid Build Coastguard Workerdeclare x86_fp80 @copysignl(x86_fp80, x86_fp80) nounwind readnone 21*9880d681SAndroid Build Coastguard Worker 22*9880d681SAndroid Build Coastguard Worker; This would crash: 23*9880d681SAndroid Build Coastguard Worker; https://llvm.org/bugs/show_bug.cgi?id=26070 24*9880d681SAndroid Build Coastguard Worker 25*9880d681SAndroid Build Coastguard Workerdefine float @pr26070() { 26*9880d681SAndroid Build Coastguard Worker %c = call float @copysignf(float 1.0, float undef) readnone 27*9880d681SAndroid Build Coastguard Worker ret float %c 28*9880d681SAndroid Build Coastguard Worker 29*9880d681SAndroid Build Coastguard Worker; CHECK-LABEL: pr26070: 30*9880d681SAndroid Build Coastguard Worker; CHECK: andps 31*9880d681SAndroid Build Coastguard Worker; CHECK-NEXT: orps 32*9880d681SAndroid Build Coastguard Worker; CHECK-NEXT: retq 33*9880d681SAndroid Build Coastguard Worker} 34*9880d681SAndroid Build Coastguard Worker 35*9880d681SAndroid Build Coastguard Workerdeclare float @copysignf(float, float) 36*9880d681SAndroid Build Coastguard Worker 37