[LLVMdev] Bad legalization?
Villmow, Micah
Micah.Villmow at amd.com
Mon Sep 15 15:05:45 PDT 2008
I am getting an assert on a bad legalization.
Assertion failed: Result.getValueType() == Op.getValueType() && "Bad
legalization!", file ..\..\lib\CodeGen\SelectionDAG\LegalizeDAG.cpp,
line 3976
Can someone explain to me what this means in term of backend code
generation, how it might be occurring, and possible ways to fix this? I
don't see how the value type of an operation and the result being the
same can cause an issue.
The IR code in question is as follows:
define void @ test_unary_func_absolute_value(i32 %x, i32 addrspace(11)*
%result) {
entry:
%call = tail call i32 (...)* @abs( i32 %x ) ; <i32>
[#uses=1]
store i32 %call, i32 addrspace(11)* %result
ret void
}
declare i32 @abs(...)
Micah Villmow
Systems Engineer
Advanced Technology & Performance
Advanced Micro Devices Inc.
4555 Great America Pkwy,
Santa Clara, CA. 95054
P: 408-572-6219
F: 408-572-6596
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20080915/d841b24f/attachment.html>
More information about the llvm-dev
mailing list