[AArch64] Generalise aarch64_simd_valid_immediate for SVE
commit6e8bf36badd0fd440148d0d732b92f5461bf16ae
authorrsandifo <rsandifo@138bc75d-0d04-0410-961f-82ee72b054a4>
Thu, 1 Feb 2018 11:03:17 +0000 (1 11:03 +0000)
committerrsandifo <rsandifo@138bc75d-0d04-0410-961f-82ee72b054a4>
Thu, 1 Feb 2018 11:03:17 +0000 (1 11:03 +0000)
tree0656a9cae26eb657f0061400eb9cb763158487c5
parent17dff2b6df74781eecb41ad0a2e515cfeb74cee6
[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>
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@257286 138bc75d-0d04-0410-961f-82ee72b054a4
gcc/ChangeLog
gcc/config/aarch64/aarch64.c