1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-21 03:53:04 +02:00
llvm-mirror/test/CodeGen/X86/pr13577.ll
Sanjay Patel 0ba1147ccc [DAGCombiner] don't dereference an operand that doesn't exist (PR26070)
The bug was introduced with changes for x86-64 fp128:
http://reviews.llvm.org/rL254653

I don't know why an x86 change is here, so I'll follow up in:
http://reviews.llvm.org/D15134

Should fix:
https://llvm.org/bugs/show_bug.cgi?id=26070

llvm-svn: 257200
2016-01-08 19:53:24 +00:00

37 lines
866 B
LLVM

; RUN: llc < %s -mtriple=x86_64-darwin | FileCheck %s
; CHECK-LABEL: LCPI0_0:
; CHECK-NEXT: .long 4286578688
; CHECK-LABEL: LCPI0_1:
; CHECK-NEXT: .long 2139095040
; CHECK-LABEL: foo:
; CHECK: testb $-128, -15(%rsp)
; CHECK: flds LCPI0_0(%rip)
; CHECK: flds LCPI0_1(%rip)
; CHECK: fcmovne %st(1), %st(0)
; CHECK: fstp %st(1)
; CHECK: retq
define x86_fp80 @foo(x86_fp80 %a) {
%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
; This would crash:
; https://llvm.org/bugs/show_bug.cgi?id=26070
define float @pr26070() {
%c = call float @copysignf(float 1.0, float undef) readnone
ret float %c
; CHECK-LABEL: pr26070:
; CHECK: andps
; CHECK-NEXT: orps
; CHECK-NEXT: retq
}
declare float @copysignf(float, float)