]> git.ipfire.org Git - thirdparty/gcc.git/commit
[committed][RISC-V][PR target/123274] Add missing condition in usmul<mode>3 pattern
authorJeff Law <jeffrey.law@oss.qualcomm.com>
Tue, 23 Dec 2025 20:25:47 +0000 (13:25 -0700)
committerJeff Law <jeffrey.law@oss.qualcomm.com>
Tue, 23 Dec 2025 20:27:30 +0000 (13:27 -0700)
commit758876f023a58b9a02f350347b58d4e116a448bc
treef01321a48e448ba3d205e0dc52fbe7a5710eb809
parent14449749559587968b96c1e54e1fd4a4a0d9ace0
[committed][RISC-V][PR target/123274] Add missing condition in usmul<mode>3 pattern

As Andrew P. noted in the BZ, the expander is missing elements in its condition
leading to generation of an insn that can't be matched.

This adds the necessary condition to the usmul<mode>3 expander which in turn
fixes the ICE.  I just checked and that expander wansn't in gcc-15, so this is
just a gcc-16 issue.

Tested on riscv32-elf and riscv64-elf.  I have a bootstrap in flight on the
Pioneer, but I'm not expecting any surprises.  Much like the patch earlier
today, I'm going to push this now rather than wait for pre-commit CI.

PR target/123274
gcc/
* config/riscv/riscv.md (usmul<mode>3): Add proper condition.

gcc/testsuite/
* gcc.target/riscv/pr123274.c: New test.
gcc/config/riscv/riscv.md
gcc/testsuite/gcc.target/riscv/pr123274.c [new file with mode: 0644]