diff --git a/lib/CodeGen/SelectionDAG/SelectionDAG.cpp b/lib/CodeGen/SelectionDAG/SelectionDAG.cpp index 6d2827e8574..c7f22dd3627 100644 --- a/lib/CodeGen/SelectionDAG/SelectionDAG.cpp +++ b/lib/CodeGen/SelectionDAG/SelectionDAG.cpp @@ -2955,8 +2955,8 @@ KnownBits SelectionDAG::computeKnownBits(SDValue Op, const APInt &DemandedElts, Known2 = computeKnownBits(N0, SubDemandedElts.shl(i), Depth + 1); unsigned Shifts = IsLE ? i : SubScale - 1 - i; - Known.One |= Known2.One.zext(BitWidth).shl(SubBitWidth * Shifts); - Known.Zero |= Known2.Zero.zext(BitWidth).shl(SubBitWidth * Shifts); + Known.One.insertBits(Known2.One, SubBitWidth * Shifts); + Known.Zero.insertBits(Known2.Zero, SubBitWidth * Shifts); } }