[PATCH][AArch64] Remove aarch64_simd_attr_length_move

Kyrill Tkachov kyrylo.tkachov@foss.arm.com
Fri May 27 20:05:00 GMT 2016


Hi all,

I notice that we can do without aarch64_simd_attr_length_move. The move alternatives for
the OI,CI,XImode modes that involve memory operands all use a single load/store so are always
length 4, whereas the register-to-register moves have a statically-known length of
(GET_MODE_BITSIZE (mode) / 128) * 4, i.e. 4 bytes for every 128-bit SIMD move instruction.
This is already encoded in the insn_count mode attribute so use that when needed.

That way we avoid a call to recog and a switch statement just to get the length of an insn.

Bootstrapped and tested on aarch64.

Ok for trunk?

Thanks,
Kyrill

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

     * config/aarch64/aarch64.c (aarch64_simd_attr_length_move): Delete.
     * config/aarch64/aarch64-protos.h (aarch64_simd_attr_length_move):
     Delete prototype.
     * config/aarch64/iterators.md (insn_count): Add descriptive comment.
     * config/aarch64/aarch64-simd.md (*aarch64_mov<mode>, VSTRUCT modes):
     Remove use of aarch64_simd_attr_length_move, set length attribute
     directly.
     (*aarch64_be_movoi): Likewise.
     (*aarch64_be_movci): Likewise.
     (*aarch64_be_movxi): Likewise.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: aarch64-simd-length.patch
Type: text/x-patch
Size: 3905 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20160527/ef28e245/attachment.bin>


More information about the Gcc-patches mailing list