From e8222f8a8f68ab3f2c3a99ab9dcba99dd28b1926 Mon Sep 17 00:00:00 2001 From: Matt Arsenault Date: Sat, 15 Nov 2025 09:54:38 -0800 Subject: [PATCH] DAG: Preserve poison in combineConcatVectorOfScalars --- llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp b/llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp index 70005ba7051cc..6fbac0f8c8cdf 100644 --- a/llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp +++ b/llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp @@ -25465,7 +25465,7 @@ static SDValue combineConcatVectorOfScalars(SDNode *N, SelectionDAG &DAG) { !Op.getOperand(0).getValueType().isVector()) Ops.push_back(Op.getOperand(0)); else if (Op.isUndef()) - Ops.push_back(DAG.getNode(ISD::UNDEF, DL, SVT)); + Ops.push_back(DAG.getNode(Op.getOpcode(), DL, SVT)); else return SDValue(); @@ -25487,7 +25487,7 @@ static SDValue combineConcatVectorOfScalars(SDNode *N, SelectionDAG &DAG) { if (Op.getValueType() == SVT) continue; if (Op.isUndef()) - Op = DAG.getNode(ISD::UNDEF, DL, SVT); + Op = DAG.getNode(Op.getOpcode(), DL, SVT); else Op = DAG.getBitcast(SVT, Op); }