2017-06-13 01:31:36 +08:00
|
|
|
; NOTE: Assertions have been autogenerated by utils/update_llc_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:
|
2020-02-07 00:12:10 +08:00
|
|
|
; CHECK-NEXT: .long 0xff800000
|
2015-07-14 10:08:23 +08:00
|
|
|
; CHECK-LABEL: LCPI0_1:
|
2020-02-07 00:12:10 +08:00
|
|
|
; CHECK-NEXT: .long 0x7f800000
|
2015-07-14 10:08:23 +08:00
|
|
|
|
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:
|
2017-12-05 01:18:51 +08:00
|
|
|
; CHECK: ## %bb.0:
|
2016-09-20 07:44:50 +08:00
|
|
|
; CHECK-NEXT: fldt {{[0-9]+}}(%rsp)
|
|
|
|
; CHECK-NEXT: fstpt -{{[0-9]+}}(%rsp)
|
|
|
|
; CHECK-NEXT: testb $-128, -{{[0-9]+}}(%rsp)
|
2021-06-12 04:26:17 +08:00
|
|
|
; CHECK-NEXT: flds {{\.?LCPI[0-9]+_[0-9]+}}(%rip)
|
|
|
|
; CHECK-NEXT: flds {{\.?LCPI[0-9]+_[0-9]+}}(%rip)
|
2019-02-04 12:15:10 +08:00
|
|
|
; CHECK-NEXT: fcmovne %st(1), %st
|
2016-09-20 07:44:50 +08:00
|
|
|
; 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:
|
2017-12-05 01:18:51 +08:00
|
|
|
; CHECK: ## %bb.0:
|
2016-09-24 07:17:29 +08:00
|
|
|
; CHECK-NEXT: movss {{.*#+}} xmm0 = mem[0],zero,zero,zero
|
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)
|
|
|
|
|