Thanks Jeff. > Thanks. Given it's a correctness thing, I'll push it shortly. I'll > also check if it's an issue in gcc-15 for a potential backport.
The gcc-15 needs the fix I bet, feel free to ping me if it is OK for backport. Pan -----Original Message----- From: Jeff Law <[email protected]> Sent: Thursday, November 20, 2025 11:15 PM To: Li, Pan2 <[email protected]>; [email protected] Cc: [email protected]; [email protected]; [email protected]; Chen, Ken <[email protected]>; Liu, Hongtao <[email protected]> Subject: Re: [PATCH v1] RISC-V: Fix missed zero extend for unsigned scalar SAT_TRUNC [PR122692] On 11/19/25 6:58 PM, [email protected] wrote: > From: Pan Li <[email protected]> > > 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. Thanks. Given it's a correctness thing, I'll push it shortly. I'll also check if it's an issue in gcc-15 for a potential backport. Thanks again for jumping on it quickly Pan! jeff
