[AArch64] Generalise aarch64_simd_valid_immediate for SVE
authorRichard Sandiford <richard.sandiford@linaro.org>
Thu, 1 Feb 2018 11:03:17 +0000 (11:03 +0000)
committerRichard Sandiford <rsandifo@gcc.gnu.org>
Thu, 1 Feb 2018 11:03:17 +0000 (11:03 +0000)
commitf9093f23517498f99768816fb11849b798db85e9
tree0656a9cae26eb657f0061400eb9cb763158487c5
parent9a1b9cb4d6fcf88d68f55b97c7d9d09c5606fed7
[AArch64] Generalise aarch64_simd_valid_immediate for SVE

The current aarch64_simd_valid_immediate code predates the move
to the new CONST_VECTOR representation, so for variable-length SVE
it only handles duplicates of single elements, rather than duplicates
of repeating patterns.

This patch removes the restriction.  It means that the validity
of a duplicated constant depends only on the bit pattern, not on
the mode used to represent it.

The patch is needed by a later big-endian fix.

2018-02-01  Richard Sandiford  <richard.sandiford@linaro.org>

gcc/
* config/aarch64/aarch64.c (aarch64_simd_valid_immediate): Handle
all CONST_VECTOR_DUPLICATE_P vectors, not just those with a single
duplicated element.

Reviewed-by: James Greenhalgh <james.greenhalgh@arm.com>
From-SVN: r257286
gcc/ChangeLog
gcc/config/aarch64/aarch64.c