]> git.ipfire.org Git - thirdparty/gcc.git/commit
arm: Fix constraints in MVE asrl and lsll patterns [PR122858]
authorChristophe Lyon <christophe.lyon@linaro.org>
Wed, 26 Nov 2025 13:03:37 +0000 (13:03 +0000)
committerChristophe Lyon <christophe.lyon@linaro.org>
Mon, 1 Dec 2025 20:13:05 +0000 (20:13 +0000)
commitcf78d402655d5fc9cb8780cb8837889afbe17ff6
tree2e637059b5b7eea75a5d9ea3387b92ed04b6b65e
parentc50d263beff78ab1133ccff1de78a50ea4851d7e
arm: Fix constraints in MVE asrl and lsll patterns [PR122858]

The second alternative for operand 1 needs a new constraint which does
not overlap with Pg, except that it can handle 32 to generate an
optimal mov.

This patch introduces a new Ph constraint which has the [32..255]
range.

This fixes a lot of regressions when running the testsuite for an MVE
target such as -march=armv8.1-m.main+mve.fp+fp.dp -mfloat-abi=hard.

gcc/ChangeLog:

PR target/122858
* config/arm/constraints.md (Ph): New constraint.
* config/arm/mve.md (mve_asrl_imm, mve_lsll_imm): Fix constraints
of operand 1 and handle 32 as special shift amount.

gcc/testsuite/ChangeLog:

PR target/122858
* gcc.target/arm/mve/pr122858.c: New test.
gcc/config/arm/constraints.md
gcc/config/arm/mve.md
gcc/testsuite/gcc.target/arm/mve/pr122858.c [new file with mode: 0644]