mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-01-12 17:32:19 +00:00
Fix bug 13532.
In SelectionDAGLegalize::ExpandLegalINT_TO_FP, expand INT_TO_FP nodes without using any f64 operations if f64 is not a legal type. Patch by Stefan Kristiansson. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@162728 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
f3c3828e57
commit
1d522388bf
@ -2042,7 +2042,7 @@ SDValue SelectionDAGLegalize::ExpandLegalINT_TO_FP(bool isSigned,
|
|||||||
SDValue Op0,
|
SDValue Op0,
|
||||||
EVT DestVT,
|
EVT DestVT,
|
||||||
DebugLoc dl) {
|
DebugLoc dl) {
|
||||||
if (Op0.getValueType() == MVT::i32) {
|
if (Op0.getValueType() == MVT::i32 && TLI.isTypeLegal(MVT::f64)) {
|
||||||
// simple 32-bit [signed|unsigned] integer to float/double expansion
|
// simple 32-bit [signed|unsigned] integer to float/double expansion
|
||||||
|
|
||||||
// Get the stack frame index of a 8 byte buffer.
|
// Get the stack frame index of a 8 byte buffer.
|
||||||
|
12
test/CodeGen/Mips/uitofp.ll
Normal file
12
test/CodeGen/Mips/uitofp.ll
Normal file
@ -0,0 +1,12 @@
|
|||||||
|
; RUN: llc -march=mips -mattr=+single-float < %s
|
||||||
|
|
||||||
|
define void @f0() nounwind {
|
||||||
|
entry:
|
||||||
|
%b = alloca i32, align 4
|
||||||
|
%a = alloca float, align 4
|
||||||
|
store volatile i32 1, i32* %b, align 4
|
||||||
|
%0 = load volatile i32* %b, align 4
|
||||||
|
%conv = uitofp i32 %0 to float
|
||||||
|
store float %conv, float* %a, align 4
|
||||||
|
ret void
|
||||||
|
}
|
Loading…
x
Reference in New Issue
Block a user