RISC-V: Fix pred_mov constraint for vle.v
authorJu-Zhe Zhong <juzhe.zhong@rivai.ai>
Thu, 19 Jan 2023 07:02:58 +0000 (15:02 +0800)
committerKito Cheng <kito.cheng@sifive.com>
Fri, 27 Jan 2023 10:02:15 +0000 (18:02 +0800)
commit4369d499f711933b8f204f896cb654423e99b039
treea92190869fe9bd58852a4ab0f7195f8c348f3aad
parent0f024ff988aeaacd8d0f967c5f841ab20fb40c19
RISC-V: Fix pred_mov constraint for vle.v

The original constraint is incorrect in pred_mov pattern.
Take a look at Alternative 2, the operands[0] is "vr",
operands[1] which is mask operand can be "vm".
Such alternative matching will give the wrong codegen (vle.v v0,0(a5),v0.t)
This is illegal according to RVV ISA.

To fix this issue and not destroy the RA performance, fix this pattern in
this patch.

gcc/ChangeLog:

* config/riscv/vector.md: Fix constraints.
gcc/config/riscv/vector.md