[LLVMdev] Chain and glue operands should occur at end of operand list
matic at nimp.co.uk
matic at nimp.co.uk
Sun Feb 3 10:58:33 PST 2013
Hi,
I got that message from a call to InstrEmitter::AddOperand. I
am writing a back end for CortexM0 (for self teaching purposes), I am
working on LDR with immediate offset instruction.
In the ARM backend,
if the offset is 0, the following code is executed by the function
ARMDAGToDAGISel::SelectThumbAddrModeImm5S
Base =
N.getOperand(0);
OffImm = CurDAG->getTargetConstant(0, MVT::i32);
If I
do a similar thing in my backend, I get this assertion message. I found
out that if I execute the code below, the problem disappear.
Base =
N;
OffImm = CurDAG->getTargetConstant(0,
TM.getTargetLowering()->getPointerTy());
Only the change for Base
seems relevant to the error though.
Could someone give me some
pointers to understand what's going on. For example, something to read
about what is "chain & glue".
Cheers,
Sebastien
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20130203/b115a631/attachment.html>
More information about the llvm-dev
mailing list