[llvm-dev] Selection DAG chain question

Hendrik Greving via llvm-dev llvm-dev at lists.llvm.org
Thu Jul 16 08:43:43 PDT 2020


I need to lower a node into something in the machine that has side effects,
i.e. needs a chain. Specifically it's actually UDIVREM. UDIVREM does not
have a chain. I can custom lower UDIVREM into the nodes I want, with chain,
I can even chain the new nodes and connect them to entry and root with
token factors. But then the new nodes are not chained with respect to other
nodes, or not chained with respect to each other, in case there are several
UDIVREM.

Hence, can I combine or lower into a node that has a chain from a node that
hadn't and let the DAG construction chain this into the existing chain? I
tried and it seemed to me that I can't.

Or is the only way to code prepare before selection DAG into e.g. a custom
intrinsic with side effects, to get the desired chain properties?

Thanks for any help in advance.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20200716/bec5a55f/attachment.html>


More information about the llvm-dev mailing list