[DAG] canCreateUndefOrPoison - remove isGuaranteedNotToBeUndefOrPoison check for shift nodes (#146502)

No longer necessary now that #146490 has landed - we still have the test coverage from #94145 that covers this.
This commit is contained in:
Simon Pilgrim
2025-07-01 12:44:59 +01:00
committed by GitHub
parent 56841565db
commit 89fe429262

View File

@@ -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: