[PATCH][AArch64] Simplify ashl<mode>3 expander for SHORT modes

Kyrill Tkachov kyrylo.tkachov@foss.arm.com
Wed Apr 27 14:11:00 GMT 2016


Hi all,

The ashl<mode>3 expander for QI and HI modes is needlessly obfuscated.
The 2nd operand predicate accepts nonmemory_operand but the expand code
FAILs if it's not a CONST_INT. We can just demand a const_int_operand in
the predicate and remove the extra CONST_INT check.

Looking at git blame, it seems it was written that way as a result of some
other refactoring a few years back for an unrelated change.

Bootstrapped and tested on aarch64-none-linux-gnu.
Ok for trunk?

Thanks,
Kyrill

2016-04-27  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>

     * config/aarch64/aarch64.md (ashl<mode>3, SHORT modes):
     Use const_int_operand for operand 2 predicate.  Simplify expand code
     as a result.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: aarch64-ashl-short.patch
Type: text/x-patch
Size: 1098 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20160427/e6f7e5e8/attachment.bin>


More information about the Gcc-patches mailing list