aboutsummaryrefslogtreecommitdiff
path: root/gcc/go/gofrontend/parse.cc
diff options
context:
space:
mode:
authorJuzhe-Zhong <juzhe.zhong@rivai.ai>2023-12-18 11:20:13 +0800
committerPan Li <pan2.li@intel.com>2023-12-18 18:15:45 +0800
commit10493cd4c1e852a4e89742b5c81e6d8bc2eef9a5 (patch)
tree95daa77ce246f55d215a906bbb4dcaa0b7acacbd /gcc/go/gofrontend/parse.cc
parent5347263b347d02e875879ca40ca6e289ac178919 (diff)
downloadgcc-10493cd4c1e852a4e89742b5c81e6d8bc2eef9a5.zip
gcc-10493cd4c1e852a4e89742b5c81e6d8bc2eef9a5.tar.gz
gcc-10493cd4c1e852a4e89742b5c81e6d8bc2eef9a5.tar.bz2
RISC-V: Fix natural regsize for fixed-vlmax of -march=rv64gc_zve32f
This patch fixes 12 ICEs of "full coverage" testing: Running target riscv-sim/-march=rv64gc_zve32f/-mabi=lp64d/-mcmodel=medlow/--param=riscv-autovec-lmul=dynamic/--param=riscv-autovec-preference=fixed-vlmax FAIL: gcc.dg/torture/pr96513.c -O3 -fomit-frame-pointer -funroll-loops -fpeel-loops -ftracer -finline-functions (internal compiler error: Segmentation fault) FAIL: gcc.dg/torture/pr96513.c -O3 -g (internal compiler error: Segmentation fault) Running target riscv-sim/-march=rv64gc_zve32f/-mabi=lp64d/-mcmodel=medlow/--param=riscv-autovec-lmul=m4/--param=riscv-autovec-preference=fixed-vlmax FAIL: gcc.dg/torture/pr111048.c -O2 (internal compiler error: Segmentation fault) FAIL: gcc.dg/torture/pr111048.c -O3 -fomit-frame-pointer -funroll-loops -fpeel-loops -ftracer -finline-functions (internal compiler error: Segmentation fault) FAIL: gcc.dg/torture/pr111048.c -O3 -g (internal compiler error: Segmentation fault) FAIL: gcc.dg/torture/pr96513.c -O3 -fomit-frame-pointer -funroll-loops -fpeel-loops -ftracer -finline-functions (internal compiler error: Segmentation fault) FAIL: gcc.dg/torture/pr96513.c -O3 -g (internal compiler error: Segmentation fault) Running target riscv-sim/-march=rv64gc_zve32f/-mabi=lp64d/-mcmodel=medlow/--param=riscv-autovec-lmul=m8/--param=riscv-autovec-preference=fixed-vlmax FAIL: gcc.dg/torture/pr96513.c -O3 -fomit-frame-pointer -funroll-loops -fpeel-loops -ftracer -finline-functions (internal compiler error: Segmentation fault) FAIL: gcc.dg/torture/pr96513.c -O3 -g (internal compiler error: Segmentation fault) Running target riscv-sim/-march=rv64gc_zve32f/-mabi=lp64d/-mcmodel=medlow/--param=riscv-autovec-preference=fixed-vlmax FAIL: gcc.c-torture/execute/20000801-1.c -O2 (internal compiler error: Segmentation fault) FAIL: gcc.c-torture/execute/20000801-1.c -O3 -fomit-frame-pointer -funroll-loops -fpeel-loops -ftracer -finline-functions (internal compiler error: Segmentation fault) FAIL: gcc.c-torture/execute/20000801-1.c -O3 -g (internal compiler error: Segmentation fault) The root cause of those ICEs is vector register size = 32bits, wheras scalar register size = 64bit. That is, vector regsize < scalar regsize on -march=rv64gc_zve32f FIXED-VLMAX. So the original natural regsize using scalar register size is incorrect. Instead, we should return minimum regsize between vector regsize and scalar regsize. gcc/ChangeLog: * config/riscv/riscv.cc (riscv_regmode_natural_size): Fix ICE for FIXED-VLMAX of -march=rv32gc_zve32f. gcc/testsuite/ChangeLog: * gcc.target/riscv/rvv/autovec/bug-4.c: New test. * gcc.target/riscv/rvv/autovec/bug-5.c: New test. * gcc.target/riscv/rvv/autovec/bug-6.c: New test.
Diffstat (limited to 'gcc/go/gofrontend/parse.cc')
0 files changed, 0 insertions, 0 deletions