]> git.ipfire.org Git - thirdparty/gcc.git/commit
arm: mve: avoid invalid immediate values in vbicq_n, vorrq_n, vmvnq_n [PR122175]
authorChristophe Lyon <christophe.lyon@linaro.org>
Mon, 10 Nov 2025 09:02:04 +0000 (09:02 +0000)
committerChristophe Lyon <christophe.lyon@linaro.org>
Wed, 12 Nov 2025 13:38:29 +0000 (13:38 +0000)
commit079e570ff8899fefdc3ef3d1a81eaaa6997f5e8e
treef66172ddaa8a8b210e6c28fd442cf3ef96b4f84c
parent2de6462c3800ff6a56e3d5ef4108a5de7f0f3757
arm: mve: avoid invalid immediate values in vbicq_n, vorrq_n, vmvnq_n [PR122175]

A constant value with the top bit of a 16-bit const passed to vbicq_n_u16 will
generate invalid assembly.  Avoid this by masking the constant during assembly
generation.

The same applies to vorrq_n and vmvnq_n.

gcc/ChangeLog:

PR target/122175
* config/arm/iterators.md (asm_const_size): New mode attr.
* config/arm/mve.md (@mve_<mve_insn>q_n_<supf><mode>): Use it.

gcc/testsuite/ChangeLog:

PR target/122175
* gcc.target/arm/mve/intrinsics/pr122175.c: New test.

Co-authored-by: Richard Earnshaw <rearnsha@arm.com>
gcc/config/arm/iterators.md
gcc/config/arm/mve.md
gcc/testsuite/gcc.target/arm/mve/intrinsics/pr122175.c [new file with mode: 0644]