<div dir="ltr">Could probably address that concern with a comment, but the alternatives (disabling the warning or doing a cast to a signed type) both seem strictly worse than removing the code, and I'm a strong proponent of warning-free code across all platforms.</div>
<div class="gmail_extra"><br><br><div class="gmail_quote">On Wed, Jul 30, 2014 at 1:39 PM, Todd Fiala <span dir="ltr"><<a href="mailto:tfiala@google.com" target="_blank">tfiala@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="">I dunno - this is encoding some logic that makes sure the reg number is<br>
between r0 and cpsr.  The fact that r0 happens to be zero is convenient in<br>
this case, but taking that out is taking out some documentation of what the<br>
code is really doing.<br>
<br>
In general I'm not a fan of removing semantic information that is<br>
meaningful to humans even if the compiler can optimize it to a simpler<br>
expression.  If this code were ever copied for another architecture where<br>
the equivalent of r0 was a different number, or if the reg_num was turned<br>
to a typedef and that changed to, say, an int, we've not only lost semantic<br>
info but also real logic.<br>
<br>
That's my 2 cents.<br>
<br>
-Todd<br>
<br>
</div><a href="http://reviews.llvm.org/D4629" target="_blank">http://reviews.llvm.org/D4629</a><br>
<br>
<br>
</blockquote></div><br></div>