[patch] Use add32ri8 and friends on fast iself

Rafael EspĂ­ndola rafael.espindola at gmail.com
Fri Mar 13 14:29:54 PDT 2015


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 --------------
A non-text attachment was scrubbed...
Name: t.patch
Type: text/x-patch
Size: 1891 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20150313/bc7d2fde/attachment.bin>


More information about the llvm-commits mailing list