Fixing add_carry (+typos).

This commit is contained in:
Ben Vanik
2014-08-22 21:58:28 -07:00
parent ba5b626cdf
commit f6c73819a3
4 changed files with 9 additions and 5 deletions

View File

@@ -317,8 +317,13 @@ int ConstantPropagationPass::Run(HIRBuilder* builder) {
}
}
}
i->Replace(&OPCODE_ASSIGN_info, 0);
i->set_src1(ca);
if (i->dest->type == ca->type) {
i->Replace(&OPCODE_ASSIGN_info, 0);
i->set_src1(ca);
} else {
i->Replace(&OPCODE_ZERO_EXTEND_info, 0);
i->set_src1(ca);
}
}
break;
case OPCODE_SUB: