> Just to make sure I understand.  We're switching to a check that we've 
> got a branchless sequence, right?  That seems like a good idea, 
> particularly when mated with the pre-existing test that we've got the 
> appropriate SAT IFN in the .optimized dump.

Yes, if hit the SAT IFN code-gen, there should be branchless, and for the
Correctness of code-gen, we have run test to take care of it.

Pan

-----Original Message-----
From: Jeff Law <jeffreya...@gmail.com> 
Sent: Monday, July 14, 2025 8:37 PM
To: Li, Pan2 <pan2...@intel.com>; gcc-patches@gcc.gnu.org
Cc: juzhe.zh...@rivai.ai; kito.ch...@gmail.com; rdapp....@gmail.com; Chen, Ken 
<ken.c...@intel.com>; Liu, Hongtao <hongtao....@intel.com>
Subject: Re: [PATCH v1] RISC-V: Refine the scalar SAT_* test cases



On 7/12/25 8:26 AM, pan2...@intel.com wrote:
> From: Pan Li <pan2...@intel.com>
> 
> Per previous discuss with Jeff, we don't do complicated
> asm check like scalar saturation alu.  It is somehow
> not easy to maintain, as well as fragile.  Thus, we
> remove these function-body check, and introduce the
> jmp label asm check instead.The code-gen of SAT_*
> will never have a jmp, and the other run test will
> make sure the correctness of SAT_* code-gen.
> 
> The below test suites are passed for this patch series.
> * The rv64gcv fully regression test.
> 
> The below failed test cases are resolved:
> FAIL: gcc.target/riscv/sat/sat_s_add_imm-2-i8.c -Oz
>    check-function-bodies sat_s_add_imm_int8_t_fmt_2_1
> FAIL: gcc.target/riscv/sat/sat_s_add_imm-2-i8.c -Os
>    check-function-bodies sat_s_add_imm_int8_t_fmt_2_1
> FAIL: gcc.target/riscv/sat/sat_s_add_imm-2-i8.c -O3
>    check-function-bodies sat_s_add_imm_int8_t_fmt_2_1
> FAIL: gcc.target/riscv/sat/sat_s_add_imm-2-i8.c -Ofast
>    check-function-bodies sat_s_add_imm_int8_t_fmt_2_1
> FAIL: gcc.target/riscv/sat/sat_s_add_imm-2-i8.c -O2
>    check-function-bodies sat_s_add_imm_int8_t_fmt_2_1
Just to make sure I understand.  We're switching to a check that we've 
got a branchless sequence, right?  That seems like a good idea, 
particularly when mated with the pre-existing test that we've got the 
appropriate SAT IFN in the .optimized dump.

Thanks for taking care of this.  While the changes aren't terribly 
complex, there's a *lot* of them.

Jeff


Reply via email to