From 941bfba32a424c6d060840d48315bda28b19c50d Mon Sep 17 00:00:00 2001 From: Chih-Min Chao Date: Tue, 23 Jun 2020 00:22:56 -0700 Subject: rvv: fix viota.m overlapping rule Signed-off-by: Chih-Min Chao --- riscv/insns/viota_m.h | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/riscv/insns/viota_m.h b/riscv/insns/viota_m.h index 69c0d20..d5b5fbc 100644 --- a/riscv/insns/viota_m.h +++ b/riscv/insns/viota_m.h @@ -7,9 +7,13 @@ reg_t rd_num = insn.rd(); reg_t rs1_num = insn.rs1(); reg_t rs2_num = insn.rs2(); require(P.VU.vstart == 0); -require_noover(rd_num, P.VU.vflmul, rs2_num, 1); require_vm; require_align(rd_num, P.VU.vflmul); +if ((P.VU.vflmul / P.VU.vsew) < 1) { + require_noover(rd_num, P.VU.vflmul, rs2_num, 1); +} else { + require_noover_widen(rd_num, P.VU.vflmul, rs2_num, 1); +} int cnt = 0; for (reg_t i = 0; i < vl; ++i) { -- cgit v1.1