[LLVMdev] legalize dag problem

shreyas krishnan shreyas76 at gmail.com
Thu Nov 12 22:29:33 PST 2009


think I found my mistake - seems to work

 SDValue Ops[] = { load->getChain(), load->getBasePtr(), des };

 DAG.getNode(CustomOpc,dl,  NodeTys, Ops, 3)

Nodetys is the return VTlist

thanks
Shrey


On Thu, Nov 12, 2009 at 5:13 PM, shreyas krishnan <shreyas76 at gmail.com> wrote:
> thanks for the help ..I do add the chain and the result.
>
> My code is like this ...
>
> SDValue Ops[] = { load->getChain(), load->getOperand(1),
> load->getBasePtr(), des };
> DAG.getNode(CustomOpc, NodeTys, Ops, 4);
>
>
> thanks again!
> shrey
>
>
>
>
>
>
> On Thu, Nov 12, 2009 at 4:41 PM, Anton Korobeynikov
> <anton at korobeynikov.info> wrote:
>>> My problem is that the second call asserts inside legalize ops at
>>> ResultVals[Op.getResNo()]; b'cos ResultVals has only 1 element and
>>> Op.resno is 0.
>> Looks like you lowered the load improperly. It should return 2 values:
>> the value loaded and a chain.
>>
>> --
>> With best regards, Anton Korobeynikov
>> Faculty of Mathematics and Mechanics, Saint Petersburg State University
>>
>



More information about the llvm-dev mailing list