gnu/gcc/2e046596d270a5c61b8a02e18e69211a04453d16
RISC-V: Fix reg overlap for vs1 of vwadd[u].wv
The vs2 of the vwadd[u].wv is read with EEW = 2 * SEW while the vs1
is read with EEW = SEW. The section 5.2 of the vector spec reserves
any encoding in which one vector register supplies source operands
with two or more different EEWs. Thus, the vs1 must not fall inside
the vs2 register group, but we may have below asm dump when the vs1
comes from the vs2 register group.
vwadd.wv v4,v4,v6
Like the vfwadd.wv, take the Wn4 constraint for the operand 3 (aka vs2)
of the vwadd[u].wv. See below issue of the riscv-isa-manual for more
details.
https://github.com/riscv/riscv-isa-manual/issues/2350
gcc/ChangeLog:
* config/riscv/vector.md: Take the Wn4 constraint for the
operand 3 of the vwadd[u].wv.
Signed-off-by: Pan Li <pan2.li@intel.com>
1 file changed