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

Unified Diff: runtime/vm/flow_graph_optimizer.cc

Issue 11085004: Faster 64-bit left-shift for ia32. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: addressed comments. Created 8 years, 2 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 | « runtime/vm/assembler_ia32_test.cc ('k') | 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 13352)
+++ runtime/vm/flow_graph_optimizer.cc (working copy)
@@ -522,17 +522,20 @@
}
break;
case Token::kSHR:
+ case Token::kSHL:
if (HasOnlyTwoSmis(ic_data)) {
operands_type = kSmiCid;
- } else if (HasTwoMintOrSmi(ic_data) &&
- FlowGraphCompiler::SupportsUnboxedMints()) {
+ } else if (FlowGraphCompiler::SupportsUnboxedMints() &&
+ HasTwoMintOrSmi(ic_data) &&
+ HasOnlyOneSmi(ICData::Handle(
+ ic_data.AsUnaryClassChecksForArgNr(1)))) {
+ // Check for smi/mint << smi or smi/mint >> smi.
operands_type = kMintCid;
} else {
return false;
}
break;
case Token::kTRUNCDIV:
- case Token::kSHL:
if (HasOnlyTwoSmis(ic_data)) {
operands_type = kSmiCid;
} else {
@@ -564,7 +567,7 @@
} else if (operands_type == kMintCid) {
Value* left = call->ArgumentAt(0)->value();
Value* right = call->ArgumentAt(1)->value();
- if (op_kind == Token::kSHR) {
+ if ((op_kind == Token::kSHR) || (op_kind == Token::kSHL)) {
ShiftMintOpInstr* shift_op =
new ShiftMintOpInstr(op_kind, left, right, call);
call->ReplaceWith(shift_op, current_iterator());
« no previous file with comments | « runtime/vm/assembler_ia32_test.cc ('k') | runtime/vm/intermediate_language.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698