]> git.ipfire.org Git - people/ms/gcc.git/commit
aarch64: Handle more SVE vector constants [PR99246]
authorRichard Sandiford <richard.sandiford@arm.com>
Wed, 14 Apr 2021 15:19:46 +0000 (16:19 +0100)
committerRichard Sandiford <richard.sandiford@arm.com>
Wed, 14 Apr 2021 15:19:46 +0000 (16:19 +0100)
commita065e0bb092a010664777394530ab1a52bb5293b
treeea7b3fa6d9e02b10b6ead9ba4cec1d50a38a1c85
parent3191c1f4488d1f7563b563d7ae2a102a26f16d82
aarch64: Handle more SVE vector constants [PR99246]

PR99246 is about a case in which we failed to handle a CONST_VECTOR
with NELTS_PER_PATTERN==2, i.e. a vector with a “foreground” sequence
of N vectors followed by a repeating “background” sequence of N vectors.

At the moment, it's difficult to produce these vectors directly,
but I'm hoping that for GCC 12 we'll do more folding, which will
in turn make this easier to test and easier to optimise.  Until then,
the patch simply relies on the testcase in the PR.

gcc/
PR target/99246
* config/aarch64/aarch64.c (aarch64_expand_sve_const_vector_sel):
New function.
(aarch64_expand_sve_const_vector): Use it for nelts_per_pattern==2.

gcc/testsuite/
PR target/99246
* gcc.target/aarch64/sve/acle/general/pr99246.c: New test.
gcc/config/aarch64/aarch64.c
gcc/testsuite/gcc.target/aarch64/sve/acle/general/pr99246.c [new file with mode: 0644]