[LLVMdev] Instruction selection of intrinsics

Jonas Paulsson jnspaulsson at hotmail.com
Tue Feb 15 08:03:04 PST 2011


Hi,

I am a bit stuck with this because the intrinsics on the LLVM I/R can only have one value, but for a memory intrinsic, I need it to have two values actually.

How should I add the second value and maintain the control chain?

The intrinsic looks like (MVT::i16, MVT::other), and if I lower the node to (MVT::i16, MVT::i16, MVT::other), I get the problem that the user of the chain is not updated to the right value index. Should I put the chain in the same slot, like (MVT::i16, MVT::other, MVT::i16), to avoid this, or must the chain be last value / first operand always, and if so, why?

Or, should I perhaps use a custom lowering and add the operand manually?

thanks,

Jonas

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


More information about the llvm-dev mailing list