From 39d4448cf8c72b3e06f719a0ea92e48b5000e0dd Mon Sep 17 00:00:00 2001 From: Luke Kenneth Casson Leighton Date: Thu, 27 Jun 2019 13:52:30 +0100 Subject: [PATCH] disable subvl-mult on predication remap --- riscv/sv_insn_redirect.cc | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/riscv/sv_insn_redirect.cc b/riscv/sv_insn_redirect.cc index 988cfca..3d6d2e9 100644 --- a/riscv/sv_insn_redirect.cc +++ b/riscv/sv_insn_redirect.cc @@ -136,7 +136,9 @@ unsigned int sv_proc_t::remap(reg_spec_t const& spec, bool pred) // register offset is computed. if subvl is active, it's a multiplier //fprintf(stderr, "remap %ld subvl %ld offs %ld subo %ld\n", // spec.reg, p->get_state()->sv().subvl, offs, subo); - offs = offs * p->get_state()->sv().subvl + subo; + if (!pred) { + offs = offs * p->get_state()->sv().subvl + subo; + } sv_shape_t *shape = p->get_state()->get_shape(spec.reg, pred); if (shape == NULL) { return offs; -- 2.30.2