OPCODE_DOT_PRODUCT_4 constant propagation

This commit is contained in:
Dr. Chat
2016-06-28 19:39:22 -05:00
parent abdf071c7d
commit 3d1d4dea47
3 changed files with 28 additions and 0 deletions

View File

@@ -657,6 +657,14 @@ bool ConstantPropagationPass::Run(HIRBuilder* builder) {
}
break;
case OPCODE_DOT_PRODUCT_4:
if (i->src1.value->IsConstant() && i->src2.value->IsConstant()) {
v->set_from(i->src1.value);
v->DotProduct4(i->src2.value);
i->Remove();
}
break;
default:
// Ignored.
break;