<div dir="ltr">Hi Eric,<div><br></div><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="">It looks like we're just conflating isRematerializable and<br>
isAsCheapAsAMove, especially in the somewhat random addition of<br>
isRematerializable to some of the instructions and then adding the<br>
rest to isAsCheapAsAMove (and are they universally cheap or is it<br>
really subtarget dependent here?) and I haven't really seen an answer<br>
to Quentin's question about that? Are these actually rematerializable<br>
or is it just cheaper/etc?<br>
<br></div></blockquote>I think I answered this question previously. RegisterCoalescer pass has the following checks,<br><br>  if (!TII->isAsCheapAsAMove(DefMI))<br>    return false;<br>  if (!TII->isTriviallyReMaterializable(DefMI, AA))<br>
    return false;</div><div class="gmail_quote"><br></div><div class="gmail_quote">They are cheap, so they are rematerializable.</div><div class="gmail_quote"><br></div><div class="gmail_quote">isAsCheapAsAMove is overridden to make sure those instructions are cheap as move.</div>
<div class="gmail_quote">isTriviallyReMaterializable is check if they are rematerializable, so isRematerializable flag is added in .td file.</div><div class="gmail_quote"><br></div>"I tried to move the check of isAsCheapAsMove to be insde isReallyTriviallyReMaterializable(), but this semantic change obviously could introduce a lot of "make check-all" regressions. I think, even if we want to change this, it would be much better we do it separately."<div class="gmail_quote">
<span style="font-family:arial,sans-serif;font-size:14.399999618530273px"><br></span></div><div class="gmail_quote">Thanks,</div><div class="gmail_quote">-Jiangning<br><div><br></div><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="">
Thanks!<br>
<br>
-eric<br>
<br>
</div><a href="http://reviews.llvm.org/D4361" target="_blank">http://reviews.llvm.org/D4361</a><br>
<br>
<br>
</blockquote></div><br></div></div>