Skip to content

Commit 6dad720

Browse files
authored
Fix cmv constant optimize bug (#325)
1 parent 4975222 commit 6dad720

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/rv32_constopt.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -946,6 +946,8 @@ CONSTOPT(cmv, {
946946
info->const_val[ir->rd] = ir->imm;
947947
ir->opcode = rv_insn_clui;
948948
ir->impl = dispatch_table[ir->opcode];
949+
} else {
950+
info->is_constant[ir->rd] = false;
949951
}
950952
})
951953

0 commit comments

Comments
 (0)