Commit 47f99d2c authored by Simon Pilgrim's avatar Simon Pilgrim
Browse files

[SelectionDAG] GetDemandedBits - remove ANY_EXTEND handling

Rely on SimplifyMultipleUseDemandedBits fallback instead.
parent b065902e
Loading
Loading
Loading
Loading
+0 −13
Original line number Diff line number Diff line
@@ -2226,19 +2226,6 @@ SDValue SelectionDAG::GetDemandedBits(SDValue V, const APInt &DemandedBits,
    }
    break;
  }
  case ISD::ANY_EXTEND: {
    SDValue Src = V.getOperand(0);
    unsigned SrcBitWidth = Src.getScalarValueSizeInBits();
    // Being conservative here - only peek through if we only demand bits in the
    // non-extended source (even though the extended bits are technically
    // undef).
    if (DemandedBits.getActiveBits() > SrcBitWidth)
      break;
    APInt SrcDemandedBits = DemandedBits.trunc(SrcBitWidth);
    if (SDValue DemandedSrc = GetDemandedBits(Src, SrcDemandedBits))
      return getNode(ISD::ANY_EXTEND, SDLoc(V), V.getValueType(), DemandedSrc);
    break;
  }
  }
  return SDValue();
}