diff options
author | Juzhe-Zhong <juzhe.zhong@rivai.ai> | 2023-06-26 20:18:04 +0800 |
---|---|---|
committer | Pan Li <pan2.li@intel.com> | 2023-06-27 08:06:30 +0800 |
commit | 2d1a3629ba3034cc16599eafb530cdada426bab3 (patch) | |
tree | 46e4c3b009739b4d9599ada2d5bcf7593b6c30ca /gcc/go | |
parent | 0aad1da62208078c04b373feb4cf90a0659eebc0 (diff) | |
download | gcc-2d1a3629ba3034cc16599eafb530cdada426bab3.zip gcc-2d1a3629ba3034cc16599eafb530cdada426bab3.tar.gz gcc-2d1a3629ba3034cc16599eafb530cdada426bab3.tar.bz2 |
RISC-V: Support const vector expansion with step vector with base != 0
Currently, we are able to generate step vector with base == 0:
{ 0, 0, 2, 2, 4, 4, ... }
ASM:
vid
vand
However, we do wrong for step vector with base != 0:
{ 1, 1, 3, 3, 5, 5, ... }
Before this patch, such case will run fail.
After this patch, we are able to pass the testcase and generate the step vector with asm:
vid
vand
vadd
gcc/ChangeLog:
* config/riscv/riscv-v.cc (expand_const_vector): Fix stepped vector
with base != 0.
gcc/testsuite/ChangeLog:
* gcc.target/riscv/rvv/autovec/partial/slp-17.c: New test.
* gcc.target/riscv/rvv/autovec/partial/slp-18.c: New test.
* gcc.target/riscv/rvv/autovec/partial/slp-19.c: New test.
* gcc.target/riscv/rvv/autovec/partial/slp_run-17.c: New test.
* gcc.target/riscv/rvv/autovec/partial/slp_run-18.c: New test.
* gcc.target/riscv/rvv/autovec/partial/slp_run-19.c: New test.
Diffstat (limited to 'gcc/go')
0 files changed, 0 insertions, 0 deletions