[LLVMdev] Intrinsic cannot use illegal type

Christian Sayer Christian.Sayer at dibcom.fr
Mon Mar 2 09:18:56 PST 2009

Hello everybody,

I use a target specific Intrinsic that returns an illegal type. The idea is that this returned value shall be eliminated when the Intrinsic node is lowered to a target node.
I realize that this is a rather late stage, since (at least) SelectionDAGLowering::visitTargetIntrinsic() requires legal types, and type legalization in general is also done before ISelLowering.

The background is that the intrinsic returns a boolean value which is evaluated by a branch instruction of a (special) loop. The branch targets of this kind of loop are actually controlled and generated by  hardware. So in the end the intrinsic should become the branch instruction and the original branch should disappear.

Is there a way to make this intrinsic go through as it is until instruction lowering, and to avoid type legalization on it?

Thanks a lot,

please ignore:

CONFIDENTIAL NOTICE: The contents of this message, including any attachments, are confidential and are intended solely for the use of the person or entity to whom the message was addressed. If you are not the intended recipient of this message, please be advised that any dissemination, distribution, or use of the contents of this message is strictly prohibited. If you received this message in error, please notify the sender. Please also permanently delete all copies of the original message and any attached documentation. Thank you.

More information about the llvm-dev mailing list