llvm-6502/test/CodeGen/XCore/fneg.ll
Eli Friedman 2ac8b324eb Fix for PR4235: to build a floating-point value from integer parts,
build an integer and cast that to a float.  This fixes a crash 
caused by trying to split an f32 into two f16's.

This changes the behavior in test/CodeGen/XCore/fneg.ll because that 
testcase now triggers a DAGCombine which converts the fneg into an integer
operation.  If someone is interested, it's probably possible to tweak 
the test to generate an actual fneg.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@72162 91177308-0d34-0410-b5e6-96231b3b80d8
2009-05-20 06:02:09 +00:00

9 lines
213 B
LLVM

; RUN: llvm-as < %s | llc -march=xcore > %t1.s
; RUN: grep "xor" %t1.s | count 1
define i1 @test(double %F) nounwind {
entry:
%0 = sub double -0.000000e+00, %F
%1 = fcmp olt double 0.000000e+00, %0
ret i1 %1
}