Commit 8d8cae5f authored by bjaideep's avatar bjaideep Committed by Commit bot

s390: Fixed error in calculating the power of 2 in Int64Mul

R=joransiu@ca.ibm.com, jyan@ca.ibm.com, michael_dawson@ca.ibm.com, mbrandy@us.ibm.com

BUG
LOG=N

Review-Url: https://codereview.chromium.org/2321973006
Cr-Commit-Position: refs/heads/master@{#39321}
parent 82bf7d75
......@@ -1104,7 +1104,7 @@ void InstructionSelector::VisitInt64Mul(Node* node) {
Node* right = m.right().node();
if (g.CanBeImmediate(right, kInt32Imm) &&
base::bits::IsPowerOfTwo64(g.GetImmediate(right))) {
int power = 31 - base::bits::CountLeadingZeros64(g.GetImmediate(right));
int power = 63 - base::bits::CountLeadingZeros64(g.GetImmediate(right));
Emit(kS390_ShiftLeft64, g.DefineSameAsFirst(node), g.UseRegister(left),
g.UseImmediate(power));
return;
......
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