[patch] Use add32ri8 and friends on fast iself

Chris Lattner clattner at apple.com
Fri Mar 13 15:02:25 PDT 2015


> On Mar 13, 2015, at 2:48 PM, Eric Christopher <echristo at gmail.com> wrote:
> 
> 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?
> 
> Chris? Here's some archaeology for you :)

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.

-Chris

> 
> -eric
> 
> On Fri, Mar 13, 2015 at 2:29 PM Rafael Espíndola <rafael.espindola at gmail.com <mailto:rafael.espindola at gmail.com>> wrote:
> This fixes pr22854.
> 
> The core issue on the bug is that there are multiple instructions that
> print the same in assembly. In fact, there doesn't seem to be any
> syntax
> for specifying that a constant that fits in 8 bits should use a 32 bit
> immediate.
> 
> The attached patch changes fast isel to consider i16immSExt8,
> i32immSExt8, and i64immSExt8. It is interesting to note that these
> predicates were explicitly disabled in r129692. It is not clear
> exactly what the issue was.
> 
> Other options would be:
> 
> * Make MC at -O0 (-mc-relax-all) relax constants. That would use the
> larger encoding even when parsing assembly.
> * Invent a syntax for requiring a 32 bit immediate.
> 
> Cheers,
> Rafael

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20150313/227f0924/attachment.html>


More information about the llvm-commits mailing list