Skip to content
Snippets Groups Projects
Commit 7e854b58 authored by Juzhe-Zhong's avatar Juzhe-Zhong Committed by Pan Li
Browse files

RISC-V: Support highest overlap for wv instructions

According to RVV ISA, we can allow vwadd.wv v2, v2, v3 overlap.

Before this patch:

        nop
        vsetivli        zero,4,e8,m4,tu,ma
        vle16.v v8,0(a0)
        vmv8r.v v0,v8
        vwsub.wv        v0,v8,v12
        nop
        addi    a4,a0,100
        vle16.v v8,0(a4)
        vmv8r.v v24,v8
        vwsub.wv        v24,v8,v12
        nop
        addi    a4,a0,200
        vle16.v v8,0(a4)
        vmv8r.v v16,v8
        vwsub.wv        v16,v8,v12
        nop

After this patch:

	nop
	vsetivli	zero,4,e8,m4,tu,ma
	vle16.v	v0,0(a0)
	vwsub.wv	v0,v0,v4
	nop
	addi	a4,a0,100
	vle16.v	v24,0(a4)
	vwsub.wv	v24,v24,v28
	nop
	addi	a4,a0,200
	vle16.v	v16,0(a4)
	vwsub.wv	v16,v16,v20

	PR target/112431

gcc/ChangeLog:

	* config/riscv/vector.md: Support highest overlap for wv instructions.

gcc/testsuite/ChangeLog:

	* gcc.target/riscv/rvv/base/pr112431-39.c: New test.
	* gcc.target/riscv/rvv/base/pr112431-40.c: New test.
	* gcc.target/riscv/rvv/base/pr112431-41.c: New test.
parent 330bb064
No related merge requests found
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment