Fix bug in global value numbering optimization

This commit is contained in:
Alexey Andreev 2021-03-22 12:52:56 +03:00
parent 60e5c0bbce
commit d6780ea637

View File

@ -549,6 +549,7 @@ public class GlobalValueNumbering implements MethodOptimization {
if (namesPreserved) {
if (insn.getReceiver().getDebugName() != null && insn.getAssignee().getDebugName() != null) {
if (!insn.getAssignee().getDebugName().equals(insn.getReceiver().getDebugName())) {
insn.setAssignee(program.variableAt(replaceMap[insn.getAssignee().getIndex()]));
return;
}
}