]> git.ipfire.org Git - thirdparty/gcc.git/commit
[RISC-V][PR target/121485] Fix mode on Zvkned lmul extending patterns
authorJeff Law <jeffrey.law@oss.qualcomm.com>
Wed, 31 Dec 2025 05:52:03 +0000 (22:52 -0700)
committerJeff Law <jeffrey.law@oss.qualcomm.com>
Wed, 31 Dec 2025 05:57:00 +0000 (22:57 -0700)
commit5d3874416c5eb09d2de3d9bfa1f22f537c3384e2
tree91c658d220ac3d92d431675c84e03df0af8edc6d
parent96a0aeaf879513090135420de14929aa850c84a2
[RISC-V][PR target/121485] Fix mode on Zvkned lmul extending patterns

This fixes the mode on the lmul-extending variants of various Zvkned patterns.

Essentially vsetvl insertion depends on the mode of each insn and for lmul
extending patterns, we need the larger mode, not the smaller one to get the
correct vsetvls.

Tested on riscv{32,64}-elf on the simple testcase in the PR.  I also verified
the larger testcase in godbolt appears to work correctly.

Waiting on upstream CI before committing.

PR target/121485
gcc/
* config/riscv/vector-crypto.md: Fix mode attribute for the
lmul extending Zvkned patterns.

gcc/testsuite/
* gcc.target/riscv/rvv/vsetvl/pr121485.c: New test.
gcc/config/riscv/vector-crypto.md
gcc/testsuite/gcc.target/riscv/rvv/vsetvl/pr121485.c [new file with mode: 0644]