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

Unified Diff: runtime/vm/intermediate_language.cc

Issue 11364222: Improve SHR by using range information for the shift count. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 8 years, 1 month 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_ia32.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/intermediate_language.cc
===================================================================
--- runtime/vm/intermediate_language.cc (revision 14856)
+++ runtime/vm/intermediate_language.cc (working copy)
@@ -1327,6 +1327,12 @@
case Token::kBIT_OR:
case Token::kBIT_XOR:
return false;
+ case Token::kSHR: {
+ // Can't deopt if shift-count is known positive.
+ Range* right_range = this->right()->definition()->range();
+ return (right_range == NULL)
+ || !right_range->IsWithin(0, RangeBoundary::kPlusInfinity);
+ }
default:
return overflow_;
}
@@ -2503,8 +2509,6 @@
return;
}
-
- // If left is a l
RangeBoundary left_min =
IsArrayLength(left_defn) ?
RangeBoundary::FromDefinition(left_defn) : left_range->min();
« no previous file with comments | « no previous file | runtime/vm/intermediate_language_ia32.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698