[LLVMdev] Type Legalizer - Load handling problem

Sachin.Punyani at microchip.com Sachin.Punyani at microchip.com
Mon Aug 18 06:31:59 PDT 2008


Hi All,

 

I have some doubt in LLVM Type Legalizer. 

 

How will LOAD:i8 with an i16 operand be lowered in type legalizer? (i16
type is not legal for our target) 

Following assertion in function ExpandIntegerOperand (file
LegalizeIntegerTypes.cpp) is not allowing us to change LOAD node. 

 

assert(Res.getValueType() == N->getValueType(0) && N->getNumValues() ==
1 && "Invalid operand expansion");

 

LOAD node has two values but the assertion checks N->getNumValues() == 1
which is not letting us change load operation. 

 

Also in the first check of the insertion, 0th value type (MVT::Other
(chain) for load) of the node N is being compared with the value type of
Res. It is not trying to compare 1st value (which is i8) of LOAD with
the 1st value of Res.

 

Regards

Sachin

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20080818/c59271f6/attachment.html>


More information about the llvm-dev mailing list