https://gcc.gnu.org/bugzilla/show_bug.cgi?id=122692
--- Comment #8 from GCC Commits <cvs-commit at gcc dot gnu.org> --- The releases/gcc-15 branch has been updated by Jeff Law <[email protected]>: https://gcc.gnu.org/g:6b368b8abdc3b92900777ca407945c3d1125d089 commit r15-10549-g6b368b8abdc3b92900777ca407945c3d1125d089 Author: Pan Li <[email protected]> Date: Thu Nov 20 08:16:10 2025 -0700 [PATCH v1] RISC-V: Fix missed zero extend for unsigned scalar SAT_TRUNC [PR122692] When the input of the scalar unsigned SAT_TRUNC is not Xmode, the rtx need to zero extend to Xmode before the underlying code gen. Most of other SAT_* code gen has leveraged the API riscv_extend_to_xmode_reg but still have the ustrunc missed. Then results in the failures mentioned in PR. The below test suites are passed for this patch series. * The rv64gcv fully regression test. PR target/122692 gcc/ChangeLog: * config/riscv/riscv.cc (riscv_expand_ustrunc): Leverage riscv_extend_to_xmode_reg to take care of src rtx. gcc/testsuite/ChangeLog: * g++.target/riscv/pr122692-run-1.C: New test. * g++.target/riscv/pr122692-run-2.C: New test. Signed-off-by: Pan Li <[email protected]> (cherry picked from commit 8615c855fa5647db11c84b882f0d88aadfc28863)
