On 6/1/2026 2:24 AM, panciyan wrote:
> This patch would like to Fix data type iterator of pack rs reg
>
> Signed-off-by: Ciyan Pan <[email protected]>
> gcc/ChangeLog:
>
>          * config/riscv/crypto.md:
>
> ---
You need to indicate what you changed in you ChangeLog entry.  Perhaps 
something like

     * config/riscv/crypto.md (riscv_pack_<X:mode><HX:mode>): Use HX to 
enforce source
     operands are half words rather than HISI would would allow HI 
sources with DI destination.


As Pan mentioned, it's advisable to include a testcase. While it's 
unlikely we'd regress this code in the future, a regression testcase 
provides  good safety net.

Depending on the failure mode you might want a simple compilation test 
or an end-to-end execution test.  The latter are a bit more complex as 
you have to ensure the test is only run on designs with the appropriate 
extension (zbkb in this case).   The basic structure would look like:


> /* { dg-do run { target riscv_zbkb } } */
> /* { dg-options "-march=rv64gc_zbkb" { target { rv64 } } } */
> /* { dg-options "-march=rv32gc_zbkb" { target { rv32 } } } */
>
>
> /* TESTCASE source */
>
>

To run your test (and not the rest of the testsuite)

make check-gcc RUNTESTFLAGS=riscv.exp=<your test name>.c

Jeff

Reply via email to