Value::MulHi and constant propagation for OPCODE_MUL_HI. Could maybe be reworked?
This commit is contained in:
@@ -354,6 +354,13 @@ bool ConstantPropagationPass::Run(HIRBuilder* builder) {
|
||||
i->Remove();
|
||||
}
|
||||
break;
|
||||
case OPCODE_MUL_HI:
|
||||
if (i->src1.value->IsConstant() && i->src2.value->IsConstant()) {
|
||||
v->set_from(i->src1.value);
|
||||
v->MulHi(i->src2.value, (i->flags & ARITHMETIC_UNSIGNED) != 0);
|
||||
i->Remove();
|
||||
}
|
||||
break;
|
||||
case OPCODE_DIV:
|
||||
if (i->src1.value->IsConstant() && i->src2.value->IsConstant()) {
|
||||
v->set_from(i->src1.value);
|
||||
|
||||
Reference in New Issue
Block a user