diff --git a/llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp b/llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp index 8e70ae6a0213..4e4e70138965 100644 --- a/llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp +++ b/llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp @@ -5623,9 +5623,7 @@ bool SelectionDAG::canCreateUndefOrPoison(SDValue Op, const APInt &DemandedElts, case ISD::SRA: // If the max shift amount isn't in range, then the shift can // create poison. - return !isGuaranteedNotToBeUndefOrPoison(Op.getOperand(1), DemandedElts, - PoisonOnly, Depth + 1) || - !getValidMaximumShiftAmount(Op, DemandedElts, Depth + 1); + return !getValidMaximumShiftAmount(Op, DemandedElts, Depth + 1); case ISD::CTTZ_ZERO_UNDEF: case ISD::CTLZ_ZERO_UNDEF: