[Bug target/123318] [14/15/16 Regression] ICE: in extract_insn, at recog.cc:2888 (unrecognizable insn) (set (reg:SF 159) (unspec:DI [...] UNSPEC_AUIPC)) with -Ofast -mcmodel=medany -mexplicit-relocs -march=rv64gv
cvs-commit at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Tue Dec 30 17:39:32 GMT 2025
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=123318
--- Comment #2 from GCC Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Jeff Law <law@gcc.gnu.org>:
https://gcc.gnu.org/g:7274c781e8e0ad113c4a16427b83f7e8b8107c70
commit r16-6441-g7274c781e8e0ad113c4a16427b83f7e8b8107c70
Author: Jeff Law <jeffrey.law@oss.qualcomm.com>
Date: Tue Dec 30 10:38:07 2025 -0700
[RISC-V][PR target/123318] Use a Pmode temporary for output of auipc
In the explict-relocs path through the RISC-V backend we generate sequences
using auipc which stores its result in a GPR.
Under the right circumstances we can end up with cases where we try to use
pseudos which may not be Pmode sized or worse yet may be a floating point
mode.
This patch forces those paths to generate a fresh temporary when the
provided
one isn't already Pmode. That helps this bug, but I'm not 100% convinced
the
explict-relocs stuff is correct and I wouldn't be surprised to find other
bugs
lurking in here.
Bootstrapped & regression tested on the Pioneer and regression tested on
riscv{32,64}-elf as well.
Will commit once pre-commit CI gives it the green light.
PR target/123318
gcc/
* config/riscv/riscv.cc (riscv_legitimize_const_move): Force
riscv_split_symbol to generate a new temporary if the provided
one isn't Pmode.
gcc/testsuite/
* gcc.target/riscv/pr123318.c: New test.
More information about the Gcc-bugs
mailing list