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

Unified Diff: src/arm64/lithium-arm64.cc

Issue 1304923003: [arm64] Don't try convert binary operation to shifted form when both operands are the same. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 4 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-crbug-523307.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/arm64/lithium-arm64.cc
diff --git a/src/arm64/lithium-arm64.cc b/src/arm64/lithium-arm64.cc
index bdf49bfff009e94a0c66c33bd7c30ac5d940fb6b..63ae4214ffc7283759c52d825cb4defe57b5e456 100644
--- a/src/arm64/lithium-arm64.cc
+++ b/src/arm64/lithium-arm64.cc
@@ -2132,6 +2132,8 @@ HBitwiseBinaryOperation* LChunkBuilder::CanTransformToShiftedOp(HValue* val,
DCHECK(hleft->representation().Equals(hinstr->representation()));
DCHECK(hright->representation().Equals(hinstr->representation()));
+ if (hleft == hright) return NULL;
+
if ((hright->IsConstant() &&
LikelyFitsImmField(hinstr, HConstant::cast(hright)->Integer32Value())) ||
(hinstr->IsCommutative() && hleft->IsConstant() &&
« no previous file with comments | « no previous file | test/mjsunit/regress/regress-crbug-523307.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698