]> git.ipfire.org Git - thirdparty/gcc.git/commit
RISC-V: Fix ICE for gcc.dg/graphite/pr33576.c with rv32gcv
authorPan Li <pan2.li@intel.com>
Thu, 5 Jun 2025 03:04:33 +0000 (11:04 +0800)
committerPan Li <pan2.li@intel.com>
Thu, 5 Jun 2025 13:24:36 +0000 (21:24 +0800)
commit8cf31de8c8fec295c5f627b399d9e015df266297
tree1cecd6d197b7ebc453aa77ed1ab800af5cf232bd
parent1d90f8c7933eb225e26b7598960bc220a582c452
RISC-V: Fix ICE for gcc.dg/graphite/pr33576.c with rv32gcv

The div of rvv has not such insn v2 = div (vec_dup (x), v1), thus
the generated rtl like that hit the unreachable assert when
expand insn.  This patch would like to remove op div from
the binary op form (vec_dup (x), v) to avoid pattern matching
by mistake.

No new test introduced as pr33576.c covered already.

The below test suites are passed for this patch series.
* The rv64gcv fully regression test.

gcc/ChangeLog:

* config/riscv/autovec-opt.md: Leverage vdup_v and v_vdup
binary op for different patterns.
* config/riscv/vector-iterators.md: Add vdup_v and v_vdup
binary op iterators.

Signed-off-by: Pan Li <pan2.li@intel.com>
gcc/config/riscv/autovec-opt.md
gcc/config/riscv/vector-iterators.md