diff --git a/src/arch/riscv/insts/vector.hh b/src/arch/riscv/insts/vector.hh index fb6c7821b5..822ee7616e 100644 --- a/src/arch/riscv/insts/vector.hh +++ b/src/arch/riscv/insts/vector.hh @@ -555,7 +555,7 @@ class VMaskMergeMicroInst : public VectorArithMicroInst Fault execute(ExecContext* xc, trace::InstRecord* traceData) const override { - vreg_t tmp_d0 = *(vreg_t *)xc->getWritableRegOperand(this, 0); + vreg_t& tmp_d0 = *(vreg_t *)xc->getWritableRegOperand(this, 0); auto Vd = tmp_d0.as(); constexpr uint8_t elems_per_vreg = VLENB / sizeof(ElemType); size_t bit_cnt = elems_per_vreg;