<html><head><meta http-equiv="Content-Type" content="text/html charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><br class=""><div><blockquote type="cite" class=""><div class="">On Mar 13, 2015, at 2:48 PM, Eric Christopher <<a href="mailto:echristo@gmail.com" class="">echristo@gmail.com</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><div dir="ltr" class="">This seems reasonable to me. I'm not sure of the rationale behind making the selector smaller - to speed it up a bit by giving it fewer options?<div class=""><br class=""></div><div class="">Chris? Here's some archaeology for you :)</div></div></div></blockquote><div><br class=""></div>IIRC the issue was that fastisel didn’t know to call the predicate to check that they were valid.  That facility got added later.  Using these instructions is definitely goodness.</div><div><br class=""></div><div>-Chris</div><div><br class=""><blockquote type="cite" class=""><div class=""><div dir="ltr" class=""><div class=""><br class=""></div><div class="">-eric<br class=""><br class=""><div class="gmail_quote">On Fri, Mar 13, 2015 at 2:29 PM Rafael Espíndola <<a href="mailto:rafael.espindola@gmail.com" class="">rafael.espindola@gmail.com</a>> wrote:<br class=""><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">This fixes pr22854.<br class="">
<br class="">
The core issue on the bug is that there are multiple instructions that<br class="">
print the same in assembly. In fact, there doesn't seem to be any<br class="">
syntax<br class="">
for specifying that a constant that fits in 8 bits should use a 32 bit<br class="">
immediate.<br class="">
<br class="">
The attached patch changes fast isel to consider i16immSExt8,<br class="">
i32immSExt8, and i64immSExt8. It is interesting to note that these<br class="">
predicates were explicitly disabled in r129692. It is not clear<br class="">
exactly what the issue was.<br class="">
<br class="">
Other options would be:<br class="">
<br class="">
* Make MC at -O0 (-mc-relax-all) relax constants. That would use the<br class="">
larger encoding even when parsing assembly.<br class="">
* Invent a syntax for requiring a 32 bit immediate.<br class="">
<br class="">
Cheers,<br class="">
Rafael<br class="">
</blockquote></div></div></div>
</div></blockquote></div><br class=""></body></html>