Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(137)

Unified Diff: runtime/vm/flow_graph_optimizer.cc

Issue 396733006: Optimize the multiplication of two 32-bit unsigned integers. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 6 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | runtime/vm/intermediate_language.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/flow_graph_optimizer.cc
===================================================================
--- runtime/vm/flow_graph_optimizer.cc (revision 38398)
+++ runtime/vm/flow_graph_optimizer.cc (working copy)
@@ -2020,6 +2020,7 @@
switch (op_kind) {
case Token::kADD:
case Token::kSUB:
+ case Token::kMUL:
if (HasOnlyTwoOf(ic_data, kSmiCid)) {
// Don't generate smi code if the IC data is marked because
// of an overflow.
@@ -2037,6 +2038,7 @@
} else if (HasOnlyTwoOf(ic_data, kFloat32x4Cid)) {
operands_type = kFloat32x4Cid;
} else if (HasOnlyTwoOf(ic_data, kInt32x4Cid)) {
+ ASSERT(op_kind != Token::kMUL); // Int32x4 doesn't have a multiply op.
operands_type = kInt32x4Cid;
} else if (HasOnlyTwoOf(ic_data, kFloat64x2Cid)) {
operands_type = kFloat64x2Cid;
@@ -2044,23 +2046,6 @@
return false;
}
break;
- case Token::kMUL:
- if (HasOnlyTwoOf(ic_data, kSmiCid)) {
- // Don't generate smi code if the IC data is marked because of an
- // overflow.
- // TODO(fschneider): Add unboxed mint multiplication.
- if (ic_data.HasDeoptReason(ICData::kDeoptBinarySmiOp)) return false;
- operands_type = kSmiCid;
- } else if (ShouldSpecializeForDouble(ic_data)) {
- operands_type = kDoubleCid;
- } else if (HasOnlyTwoOf(ic_data, kFloat32x4Cid)) {
- operands_type = kFloat32x4Cid;
- } else if (HasOnlyTwoOf(ic_data, kFloat64x2Cid)) {
- operands_type = kFloat64x2Cid;
- } else {
- return false;
- }
- break;
case Token::kDIV:
if (ShouldSpecializeForDouble(ic_data) ||
HasOnlyTwoOf(ic_data, kSmiCid)) {
« no previous file with comments | « no previous file | runtime/vm/intermediate_language.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698