[LLVMbugs] [Bug 13532] New: Assert on expanded UINT_TO_FP on backends without native f64 support (e.g. Mips and MBlaze)
bugzilla-daemon at llvm.org
bugzilla-daemon at llvm.org
Mon Aug 6 05:23:42 PDT 2012
http://llvm.org/bugs/show_bug.cgi?id=13532
Bug #: 13532
Summary: Assert on expanded UINT_TO_FP on backends without
native f64 support (e.g. Mips and MBlaze)
Product: new-bugs
Version: trunk
Platform: PC
OS/Version: Linux
Status: NEW
Severity: normal
Priority: P
Component: new bugs
AssignedTo: unassignedbugs at nondot.org
ReportedBy: stefan.kristiansson at saunalahti.fi
CC: llvmbugs at cs.uiuc.edu
Classification: Unclassified
This testcase:
$ cat uitofp.ll
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
}
$ llc -march=mips -mattr=+single-float uitofp.ll -o -
Will cause the following assert:
llc: /path/to/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp:1146: void
{anonymous}::SelectionDAGLegalize::LegalizeOp(llvm::SDNode*): Assertion
`(TLI.getTypeAction(*DAG.getContext(), Node->getOperand(i).getValueType()) ==
TargetLowering::TypeLegal || Node->getOperand(i).getOpcode() ==
ISD::TargetConstant) && "Unexpected illegal type!"' failed.
Stack dump:
0. Program arguments: ./bin/llc -mattr=+single-float ../../test/uitofp.ll
1. Running pass 'Function Pass Manager' on module '../../test/uitofp.ll'.
2. Running pass 'MIPS DAG->DAG Pattern Instruction Selection' on function
'@f0'
Aborted (core dumped)
The way I understand the thing is that
SelectionDAGLegalize::ExpandLegalINT_TO_FP will insert nodes with
MVT::f64's in them, but this is "too late", since
SelectionDAGLegalize::LegalizeOp expects all the value types to be
natively supported by the target (which is not the case for Mips with MVT::f64
when the +single-float attribute is given).
--
Configure bugmail: http://llvm.org/bugs/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.
More information about the llvm-bugs
mailing list