[Bug target/122692] [15 regression] U16 array to U8 array saturation test fails on riscv64-linux-gnu

2025-11-24 Thread law at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=122692

Jeffrey A. Law  changed:

   What|Removed |Added

 Resolution|--- |FIXED
 Status|ASSIGNED|RESOLVED

--- Comment #9 from Jeffrey A. Law  ---
And the patch has been backported to the gcc-15 branch.

[Bug target/122692] [15 regression] U16 array to U8 array saturation test fails on riscv64-linux-gnu

2025-11-24 Thread cvs-commit at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=122692

--- Comment #8 from GCC Commits  ---
The releases/gcc-15 branch has been updated by Jeff Law :

https://gcc.gnu.org/g:6b368b8abdc3b92900777ca407945c3d1125d089

commit r15-10549-g6b368b8abdc3b92900777ca407945c3d1125d089
Author: Pan Li 
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 
(cherry picked from commit 8615c855fa5647db11c84b882f0d88aadfc28863)

[Bug target/122692] [15 regression] U16 array to U8 array saturation test fails on riscv64-linux-gnu

2025-11-20 Thread law at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=122692

Jeffrey A. Law  changed:

   What|Removed |Added

Summary|[15/16 regression] U16  |[15 regression] U16 array
   |array to U8 array   |to U8 array saturation test
   |saturation test fails on|fails on riscv64-linux-gnu
   |riscv64-linux-gnu   |
 Blocks||120763

--- Comment #7 from Jeffrey A. Law  ---
Pan's patch fixed this on the trunk.  After the usual soak time I'll make sure
it gets backported to gcc-15.


Referenced Bugs:

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=120763
[Bug 120763] [meta-bug] Tracker for bugs to visit during weekly RISC-V meeting