From cfc89a1ac9b188e5b876fb54e8aa0f21509143f9 Mon Sep 17 00:00:00 2001 From: fourcolor Date: Sun, 7 Jan 2024 12:01:10 +0800 Subject: [PATCH] Fix cmv constant optimize bug --- src/rv32_constopt.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/rv32_constopt.c b/src/rv32_constopt.c index 14a957b3..c2711595 100644 --- a/src/rv32_constopt.c +++ b/src/rv32_constopt.c @@ -946,6 +946,8 @@ CONSTOPT(cmv, { info->const_val[ir->rd] = ir->imm; ir->opcode = rv_insn_clui; ir->impl = dispatch_table[ir->opcode]; + } else { + info->is_constant[ir->rd] = false; } })