Skip to content

Commit 72f87d2

Browse files
authored
[DAG] canCreateUndefOrPoison - remove isGuaranteedNotToBeUndefOrPoison check for insert/extract vector element indices (#146514)
No longer necessary now that #146490 has landed
1 parent 524f090 commit 72f87d2

File tree

1 file changed

+2
-6
lines changed

1 file changed

+2
-6
lines changed

llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5640,12 +5640,8 @@ bool SelectionDAG::canCreateUndefOrPoison(SDValue Op, const APInt &DemandedElts,
56405640
// Ensure that the element index is in bounds.
56415641
EVT VecVT = Op.getOperand(0).getValueType();
56425642
SDValue Idx = Op.getOperand(Opcode == ISD::INSERT_VECTOR_ELT ? 2 : 1);
5643-
if (isGuaranteedNotToBeUndefOrPoison(Idx, DemandedElts, PoisonOnly,
5644-
Depth + 1)) {
5645-
KnownBits KnownIdx = computeKnownBits(Idx, Depth + 1);
5646-
return KnownIdx.getMaxValue().uge(VecVT.getVectorMinNumElements());
5647-
}
5648-
return true;
5643+
KnownBits KnownIdx = computeKnownBits(Idx, Depth + 1);
5644+
return KnownIdx.getMaxValue().uge(VecVT.getVectorMinNumElements());
56495645
}
56505646

56515647
case ISD::VECTOR_SHUFFLE: {

0 commit comments

Comments
 (0)