diff options
author | Bohan Lei <garthlei@linux.alibaba.com> | 2024-09-18 07:20:23 -0600 |
---|---|---|
committer | Jeff Law <jlaw@ventanamicro.com> | 2024-09-18 07:22:04 -0600 |
commit | 0756f335fb6e455641850a76e68f892f1f82ada2 (patch) | |
tree | f794de0fc3684b34c19c12173ce82555f34de1ea /gcc/jit | |
parent | 5c8f9f4d4cebabf85e68c5bdbe2d4ee6646edc7c (diff) | |
download | gcc-0756f335fb6e455641850a76e68f892f1f82ada2.zip gcc-0756f335fb6e455641850a76e68f892f1f82ada2.tar.gz gcc-0756f335fb6e455641850a76e68f892f1f82ada2.tar.bz2 |
[PATCH] RISC-V: Allow zero operand for DI variants of vssubu.vx
The RISC-V vector machine description relies on the helper function
`sew64_scalar_helper` to emit actual insns for the DI variants of
vssub.vx and vssubu.vx. This works with vssub.vx, but can cause
problems with vssubu.vx with the scalar operand being constant zero,
because `has_vi_variant_p` returns false, and the operand will be taken
without being loaded into a reg. The attached testcases can cause an
internal compiler error as a result.
Allowing a constant zero operand in those insns seems to be a simple
solution that only affects minimum existing code.
gcc/ChangeLog:
* config/riscv/vector.md: Allow zero operand for DI variants of
vssubu.vx
gcc/testsuite/ChangeLog:
* gcc.target/riscv/rvv/base/vssubu-1.c: New test.
* gcc.target/riscv/rvv/base/vssubu-2.c: New test.
Diffstat (limited to 'gcc/jit')
0 files changed, 0 insertions, 0 deletions