Commit 85f6e168 authored by ishell's avatar ishell Committed by Commit bot

[arm64] Don't try convert binary operation to shifted form when both operands are the same.

BUG=chromium:523307
LOG=N

Review URL: https://codereview.chromium.org/1304923003

Cr-Commit-Position: refs/heads/master@{#30538}
parent 93f1f198
......@@ -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() &&
......
// Copyright 2015 the V8 project authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
// Flags: --allow-natives-syntax
function f(x) {
var c = x * x << 366;
var a = c + c;
return a;
}
f(1);
f(1);
%OptimizeFunctionOnNextCall(f);
f(1);
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment