]> git.ipfire.org Git - thirdparty/gcc.git/commit
RISC-V: Make tuple vector not tieable to some modes.
authorwangzicong <wangzicong@masscore.cn>
Thu, 30 Apr 2026 13:23:07 +0000 (21:23 +0800)
committerRobin Dapp <robin.dapp@oss.qualcomm.com>
Tue, 5 May 2026 13:58:33 +0000 (15:58 +0200)
commit8add8bccdcdd40103c320648d00a07c54d97160d
tree3d69cfa605da8a19414cfa581cb0c4239c7f5d98
parent2c7ad6008d3cfa9fbd052a6baf76e3e5249e12be
RISC-V: Make tuple vector not tieable to some modes.

This patch makes riscv tuple modes not tieable to non-tuple modes. Without
this patch some unnecessary type conversions may occur, especially when zvl
is specified.
E.g. RVVMF2x4HI and RVVM2DI are tieable in gcc trunk, and when extracting
an inner vector mode RVVMF2HI from RVVMF2x4HI and zvl is specified, it will
be converted to DI, which is not expected. But with same inner modes, e.g.
RVVM1x4QI and RVVM1QI, they should be tieable.

        PR target/124448

gcc/ChangeLog:

* config/riscv/riscv.cc (riscv_modes_tieable_p): Make tuple modes
not tieable to some modes.

gcc/testsuite/ChangeLog:

* gcc.target/riscv/rvv/autovec/pr124448.c: New test.

Signed-off-by: wangzicong <wangzicong@masscore.cn>
gcc/config/riscv/riscv.cc
gcc/testsuite/gcc.target/riscv/rvv/autovec/pr124448.c [new file with mode: 0644]