[llvm-branch-commits] [llvm] [SelectionDAG] Track demanded concat elements in noundef checks (PR #200932)
Simon Pilgrim via llvm-branch-commits
llvm-branch-commits at lists.llvm.org
Tue Jun 2 02:13:39 PDT 2026
================
@@ -5665,6 +5665,32 @@ bool SelectionDAG::isGuaranteedNotToBeUndefOrPoison(SDValue Op,
}
return true;
+ case ISD::CONCAT_VECTORS: {
+ if (!DemandedElts)
+ return true;
+
+ EVT VT = Op.getValueType();
+ if (!VT.isFixedLengthVector())
+ return all_of(Op->ops(), [&](SDValue V) {
+ return isGuaranteedNotToBeUndefOrPoison(V, Kind, Depth + 1);
+ });
+
+ assert(DemandedElts.getBitWidth() == VT.getVectorNumElements() &&
----------------
RKSimon wrote:
this should be done generically at the top of the function like SelectionDAG::computeKnownBits
https://github.com/llvm/llvm-project/pull/200932
More information about the llvm-branch-commits
mailing list