<div dir="ltr">On 30 July 2013 13:08, Tim Northover <span dir="ltr"><<a href="mailto:t.p.northover@gmail.com" target="_blank">t.p.northover@gmail.com</a>></span> wrote:<br><div class="gmail_extra"><div class="gmail_quote">
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div class="im"><span style="color:rgb(34,34,34)">It looks like that'll happen automatically. The function</span><br>
</div>
DAGTypeLegalizer::ReplaceValueWith gets called straight after ARM's<br>
ReplaceNodeResults and has code to add the new nodes to the worklist<br>
appropriately.</blockquote><div><br></div><div>Ha, ok. Makes sense. I had changed ReplaceNodeResults to either leave Results untouched (in which case it'd expand) or leave the same node in, in which case ReplaceValueWith would fail, because it'd be circular, so I added a hack:</div>
<div><br></div><div><div>  for (unsigned i = 0, e = Results.size(); i != e; ++i) {</div><div>    SDValue Old = SDValue(N, i);</div><div>    SDValue New = Results[i];</div><div>    if (Old != New)</div><div>      ReplaceValueWith(Old, New);</div>
<div>  }</div></div><div><br></div><div>Now I remember, this is why I thought about introducing another NodeType (as you mentioned, ISD::SREM64), but thought that this was a work around at best. Also, I will probably have to create 4 new node types (S/U)x(DIV/REM).</div>
<div><br></div><div>Ok, now I have a lead, thanks for the input!</div><div><br></div><div>cheers,</div><div>--renato</div></div></div></div>