<div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote">2015-07-08 17:58 GMT+02:00 escha <span dir="ltr"><<a href="mailto:escha@apple.com" target="_blank">escha@apple.com</a>></span>:<br><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"><span class="">[...]<br></span><br>
If you want to “revert" this sort of thing, you can do it at Select() time or PreprocessISelDAG(), which is what I did on an out-of-tree backend to turn add X, -C into sub X, C on selection time. This still lets all the intermediate optimizations take advantage of the canonicalization.<br>
<span class=""><font color="#888888"><br>
—escha</font></span></blockquote></div><br></div><div class="gmail_extra">Unaware of your proposal, I used the TargetLowering::PerformDAGCombine hook.</div><div class="gmail_extra">Is there a reason to prefere PreprocessISelDAG ?</div><div class="gmail_extra"><br></div><div class="gmail_extra">--</div><div class="gmail_extra">Fred</div></div>