· 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)
legalize-dags.pdf (45.5 KB)
dag-combine1.pdf (44.5 KB)