[llvm-dev] Instruction selection phase

Miguel Iñigo J. Mañalac via llvm-dev llvm-dev at lists.llvm.org
Thu Mar 26 17:56:26 PDT 2020

Hello LLVM-Dev,

Attached are:

·         The DAG after being built

·         The DAG before the legalization phase

The DAG illustrated performs a signed division for type i32. As can be seen, the SDIV node was converted to a series of other nodes (which includes a MULHS node). In the target lowering class of our target, the SDIV has an operation action of custom. Does anybody know where in between the SelectionDAGBuilder and the Legalization phases the SDIV node got converted? I need the SDIV node to stay as an SDIV node until legalization phase (where it will be lowered into a library call). How can this behavior be accomplished? Does the converted series of nodes still perform the expected operation?

Thank you very much in advance for your help!

Miguel Inigo J. Manalac (1852)

JAPANESE: ???????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????? ENGLISH: This e-mail is intended for the person(s) to which it is addressed. If you have received it by mistake, please notify the sender and delete the received email. In addition, our company shall not assume any responsibility even if it causes any inconvenience, such as loss of mail, inconsistencies, delays, etc., due to the inclusion of computer viruses.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20200327/7bc9722e/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: legalize-dags.pdf
Type: application/pdf
Size: 46606 bytes
Desc: legalize-dags.pdf
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20200327/7bc9722e/attachment-0002.pdf>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: dag-combine1.pdf
Type: application/pdf
Size: 45602 bytes
Desc: dag-combine1.pdf
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20200327/7bc9722e/attachment-0003.pdf>

More information about the llvm-dev mailing list