]> git.ipfire.org Git - thirdparty/gcc.git/commit
RISC-V: Fix the riscv_legitimize_poly_move issue on targets where the minimal VLEN...
authorKito Cheng <kito.cheng@sifive.com>
Tue, 3 Oct 2023 02:27:24 +0000 (10:27 +0800)
committerKito Cheng <kito.cheng@sifive.com>
Fri, 13 Oct 2023 03:53:09 +0000 (20:53 -0700)
commit0f40e59f193f96f1bb0fa3e1c2d160567ed29b32
treeff55af329f6f14a8043869cd7ea84f9969cd51b9
parentf0b05073bd3f0e5c8e55ef5a6fd16aa4518956a4
RISC-V: Fix the riscv_legitimize_poly_move issue on targets where the minimal VLEN exceeds 512.

riscv_legitimize_poly_move was expected to ensure the poly value is at most 32
times smaller than the minimal VLEN (32 being derived from '4096 / 128').
This assumption held when our mode modeling was not so precisely defined.
However, now that we have modeled the mode size according to the correct minimal
VLEN info, the size difference between different RVV modes can be up to 64
times. For instance, comparing RVVMF64BI and RVVMF1BI, the sizes are [1, 1]
versus [64, 64] respectively.

gcc/ChangeLog:

* config/riscv/riscv.cc (riscv_legitimize_poly_move): Bump
max_power to 64.
* config/riscv/riscv.h (MAX_POLY_VARIANT): New.

gcc/testsuite/ChangeLog:

* g++.target/riscv/rvv/autovec/bug-01.C: New.
* g++.target/riscv/rvv/rvv.exp: Add autovec folder.
gcc/config/riscv/riscv.cc
gcc/config/riscv/riscv.h
gcc/testsuite/g++.target/riscv/rvv/autovec/bug-01.C [new file with mode: 0644]
gcc/testsuite/g++.target/riscv/rvv/rvv.exp