2016-09-20 07:44:50 +08:00
|
|
|
; NOTE: Assertions have been autogenerated by utils/update_test_checks.py
|
2015-07-14 11:07:06 +08:00
|
|
|
; RUN: llc < %s -mtriple=x86_64-darwin | FileCheck %s
|
2012-08-12 07:47:06 +08:00
|
|
|
|
2015-07-14 10:08:23 +08:00
|
|
|
; CHECK-LABEL: LCPI0_0:
|
|
|
|
; CHECK-NEXT: .long 4286578688
|
|
|
|
; CHECK-LABEL: LCPI0_1:
|
|
|
|
; CHECK-NEXT: .long 2139095040
|
|
|
|
|
2012-08-12 07:47:06 +08:00
|
|
|
define x86_fp80 @foo(x86_fp80 %a) {
|
2016-09-20 07:44:50 +08:00
|
|
|
; CHECK-LABEL: foo:
|
|
|
|
; CHECK: ## BB#0:
|
|
|
|
; CHECK-NEXT: fldt {{[0-9]+}}(%rsp)
|
|
|
|
; CHECK-NEXT: fstpt -{{[0-9]+}}(%rsp)
|
|
|
|
; CHECK-NEXT: testb $-128, -{{[0-9]+}}(%rsp)
|
|
|
|
; CHECK-NEXT: flds LCPI0_0(%rip)
|
|
|
|
; CHECK-NEXT: flds LCPI0_1(%rip)
|
|
|
|
; CHECK-NEXT: fcmovne %st(1), %st(0)
|
|
|
|
; CHECK-NEXT: fstp %st(1)
|
|
|
|
; CHECK-NEXT: retq
|
|
|
|
;
|
2012-08-12 07:47:06 +08:00
|
|
|
%1 = tail call x86_fp80 @copysignl(x86_fp80 0xK7FFF8000000000000000, x86_fp80 %a) nounwind readnone
|
|
|
|
ret x86_fp80 %1
|
|
|
|
}
|
|
|
|
|
|
|
|
declare x86_fp80 @copysignl(x86_fp80, x86_fp80) nounwind readnone
|
2016-01-09 03:53:24 +08:00
|
|
|
|
|
|
|
; This would crash:
|
|
|
|
; https://llvm.org/bugs/show_bug.cgi?id=26070
|
|
|
|
|
|
|
|
define float @pr26070() {
|
2016-09-20 07:44:50 +08:00
|
|
|
; CHECK-LABEL: pr26070:
|
|
|
|
; CHECK: ## BB#0:
|
2016-09-24 07:17:29 +08:00
|
|
|
; CHECK-NEXT: movss {{.*#+}} xmm0 = mem[0],zero,zero,zero
|
|
|
|
; CHECK-NEXT: shufps {{.*#+}} xmm0 = xmm0[0,0,0,0]
|
2016-12-18 15:54:23 +08:00
|
|
|
; CHECK-NEXT: orps {{.*}}(%rip), %xmm0
|
2016-09-20 07:44:50 +08:00
|
|
|
; CHECK-NEXT: retq
|
|
|
|
;
|
2016-01-09 03:53:24 +08:00
|
|
|
%c = call float @copysignf(float 1.0, float undef) readnone
|
|
|
|
ret float %c
|
|
|
|
}
|
|
|
|
|
|
|
|
declare float @copysignf(float, float)
|
|
|
|
|