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

Unified Diff: src/hydrogen.cc

Issue 197803005: Check that constant is an integer before getting its value in HGraphBuilder::MatchRotateRight. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: remove redundant check Created 6 years, 9 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 | test/mjsunit/regress/regress-351263.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/hydrogen.cc
diff --git a/src/hydrogen.cc b/src/hydrogen.cc
index 6dae101b08c1e41a05304a14b33f12029da793a2..2881e90534a0ab22935fc5ba26fd4c33b7a0e81a 100644
--- a/src/hydrogen.cc
+++ b/src/hydrogen.cc
@@ -8932,13 +8932,7 @@ static bool ShiftAmountsAllowReplaceByRotate(HValue* sa,
}
if (!const32_minus_sa->IsSub()) return false;
HSub* sub = HSub::cast(const32_minus_sa);
- if (sa != sub->right()) return false;
- HValue* const32 = sub->left();
- if (!const32->IsConstant() ||
- HConstant::cast(const32)->Integer32Value() != 32) {
- return false;
- }
- return (sub->right() == sa);
+ return sub->left()->EqualsInteger32Constant(32) && sub->right() == sa;
}
« no previous file with comments | « no previous file | test/mjsunit/regress/regress-351263.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698