mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-12-17 18:31:04 +00:00
2ac8b324eb
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
12 lines
242 B
LLVM
12 lines
242 B
LLVM
; RUN: llvm-as < %s | llc -march=msp430
|
|
|
|
define i16 @test(double %d) nounwind {
|
|
entry:
|
|
%add = add double %d, 1.000000e+00
|
|
%call = tail call i16 @funct(double %add) nounwind
|
|
ret i16 %call
|
|
}
|
|
|
|
declare i16 @funct(double)
|
|
|