diff options
-rw-r--r-- | riscv/processor.cc | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/riscv/processor.cc b/riscv/processor.cc index 3db6b54..74c5a2a 100644 --- a/riscv/processor.cc +++ b/riscv/processor.cc @@ -235,7 +235,7 @@ reg_t vectorUnit_t::set_vl(int regId, reg_t reqVL, reg_t newType){ if (vlmax == 0) { vl = 0; } else if (regId == 0) { - vl = vsew == old_sew && vlmul == old_lmul ? vl : 0; + vl = vl > vlmax ? vlmax : vl; } else if (regId == -1) { vl = vlmax; } else if (regId >= 0) { |