<div dir="ltr"><br><br><div class="gmail_quote">On Fri, Mar 13, 2015 at 3:02 PM Chris Lattner <<a href="mailto:clattner@apple.com">clattner@apple.com</a>> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div style="word-wrap:break-word"><div><blockquote type="cite"><div>On Mar 13, 2015, at 2:48 PM, Eric Christopher <<a href="mailto:echristo@gmail.com" target="_blank">echristo@gmail.com</a>> wrote:</div><br><div><div dir="ltr">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><br></div><div>Chris? Here's some archaeology for you :)</div></div></div></blockquote><div><br></div></div></div><div style="word-wrap:break-word"><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><div style="word-wrap:break-word"><div><br></div></div></blockquote><div><br></div><div>Sweet. Thanks for the brain picking :)</div><div><br></div><div>Rafael - have at.</div><div><br></div><div>-eric</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div style="word-wrap:break-word"><div></div><div>-Chris</div></div><div style="word-wrap:break-word"><div><br><blockquote type="cite"><div><div dir="ltr"><div><br></div><div>-eric<br><br><div class="gmail_quote">On Fri, Mar 13, 2015 at 2:29 PM Rafael Espíndola <<a href="mailto:rafael.espindola@gmail.com" target="_blank">rafael.espindola@gmail.com</a>> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">This fixes pr22854.<br>
<br>
The core issue on the bug is that there are multiple instructions that<br>
print the same in assembly. In fact, there doesn't seem to be any<br>
syntax<br>
for specifying that a constant that fits in 8 bits should use a 32 bit<br>
immediate.<br>
<br>
The attached patch changes fast isel to consider i16immSExt8,<br>
i32immSExt8, and i64immSExt8. It is interesting to note that these<br>
predicates were explicitly disabled in r129692. It is not clear<br>
exactly what the issue was.<br>
<br>
Other options would be:<br>
<br>
* Make MC at -O0 (-mc-relax-all) relax constants. That would use the<br>
larger encoding even when parsing assembly.<br>
* Invent a syntax for requiring a 32 bit immediate.<br>
<br>
Cheers,<br>
Rafael<br>
</blockquote></div></div></div>
</div></blockquote></div><br></div></blockquote></div></div>