<div dir="ltr">I dunno - this is encoding some logic that makes sure the reg number is between r0 and cpsr.  The fact that r0 happens to be zero is convenient in this case, but taking that out is taking out some documentation of what the code is really doing.<div>
<br></div><div>In general I'm not a fan of removing semantic information that is meaningful to humans even if the compiler can optimize it to a simpler expression.  If this code were ever copied for another architecture where the equivalent of r0 was a different number, or if the reg_num was turned to a typedef and that changed to, say, an int, we've not only lost semantic info but also real logic.</div>
<div><br></div><div>That's my 2 cents.</div><div><br></div><div>-Todd</div></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Wed, Jul 30, 2014 at 1:33 PM, Zachary Turner <span dir="ltr"><<a href="mailto:zturner@google.com" target="_blank">zturner@google.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="">For trivial warning fixes you can probably just submit.<br>
<br>
</div><a href="http://reviews.llvm.org/D4629" target="_blank">http://reviews.llvm.org/D4629</a><br>
<br>
<br>
</blockquote></div><br><br clear="all"><div><br></div>-- <br><div dir="ltr"><table cellspacing="0" cellpadding="0" style="color:rgb(136,136,136);font-family:'Times New Roman'"><tbody><tr style="color:rgb(85,85,85);font-family:sans-serif;font-size:small">
<td nowrap style="border-top-style:solid;border-top-color:rgb(213,15,37);border-top-width:2px">Todd Fiala |</td><td nowrap style="border-top-style:solid;border-top-color:rgb(51,105,232);border-top-width:2px"> Software Engineer |</td>
<td nowrap style="border-top-style:solid;border-top-color:rgb(0,153,57);border-top-width:2px"> <a href="mailto:tfiala@google.com" style="color:rgb(17,85,204)" target="_blank"><span style="background-color:rgb(255,255,204);color:rgb(34,34,34);background-repeat:initial initial">tfiala@google.com</span></a> |</td>
<td nowrap style="border-top-style:solid;border-top-color:rgb(238,178,17);border-top-width:2px"><font color="#1155cc"> <a>650-943-3180</a></font></td></tr></tbody></table><br></div>
</div>