[i386] New lea patterns for PR71321
Bernd Schmidt
bschmidt@redhat.com
Tue Dec 20 21:32:00 GMT 2016
The problem here is that we don't have complete coverage of lea patterns
for HImode/QImode: the combiner can't recognize a (plus (ashift reg 2)
reg) pattern it builds.
My first idea was to canonicalize ASHIFT by constant inside PLUS to
MULT. The docs say that this is done only inside a MEM context, but that
seems misguided considering the existence of lea patterns. Maybe that's
something to revisit for gcc-8. In the meantime, the patch below is more
like a minimal fix, and it seems to produce better results at the moment
anyway.
Bootstrapped and tested on x86_64-linux. Ok?
Bernd
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 71321.diff
Type: text/x-patch
Size: 3831 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20161220/5f6070db/attachment.bin>
More information about the Gcc-patches
mailing list