Fixing divd constant.

This commit is contained in:
Ben Vanik
2015-05-12 23:38:02 -07:00
parent 4327724f77
commit 4248268b4f
9 changed files with 235 additions and 65 deletions

View File

@@ -350,7 +350,7 @@ bool ConstantPropagationPass::Run(HIRBuilder* builder) {
case OPCODE_DIV:
if (i->src1.value->IsConstant() && i->src2.value->IsConstant()) {
v->set_from(i->src1.value);
v->Div(i->src2.value);
v->Div(i->src2.value, (i->flags & ARITHMETIC_UNSIGNED) != 0);
i->Remove();
}
break;