Commit 18453c9b authored by Michael Starzinger's avatar Michael Starzinger Committed by Commit Bot

[turbofan] Inline last remaining WhichPowerOf2Abs use.

R=clemensh@chromium.org

Change-Id: Iecd5fc789b74ae8bcb4bdcb98fcf248c8bc6f6e7
Reviewed-on: https://chromium-review.googlesource.com/568478
Commit-Queue: Michael Starzinger <mstarzinger@chromium.org>
Reviewed-by: 's avatarClemens Hammacher <clemensh@chromium.org>
Cr-Commit-Position: refs/heads/master@{#46668}
parent dad1a8d1
......@@ -800,8 +800,8 @@ Reduction MachineOperatorReducer::ReduceInt32Div(Node* node) {
int32_t const divisor = m.right().Value();
Node* const dividend = m.left().node();
Node* quotient = dividend;
if (divisor == kMinInt || base::bits::IsPowerOfTwo(Abs(divisor))) {
uint32_t const shift = WhichPowerOf2Abs(divisor);
if (base::bits::IsPowerOfTwo(Abs(divisor))) {
uint32_t const shift = WhichPowerOf2(Abs(divisor));
DCHECK_NE(0u, shift);
if (shift > 1) {
quotient = Word32Sar(quotient, 31);
......
......@@ -227,11 +227,6 @@ inline double Pow(double x, double y) {
return std::pow(x, y);
}
// TODO(svenpanne) Clean up the whole power-of-2 mess.
inline int32_t WhichPowerOf2Abs(int32_t x) {
return (x == kMinInt) ? 31 : WhichPowerOf2(Abs(x));
}
// ----------------------------------------------------------------------------
// BitField is a help template for encoding and decode bitfield with
......
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