[llvm] dd9bd3e - DAG: Preserve poison in combineConcatVectorOfScalars (#168220)

via llvm-commits llvm-commits at lists.llvm.org
Sun Nov 16 11:16:37 PST 2025


Author: Matt Arsenault
Date: 2025-11-16T11:16:34-08:00
New Revision: dd9bd3e8f0186b231c24a89af3d1b61202c68d91

URL: https://github.com/llvm/llvm-project/commit/dd9bd3e8f0186b231c24a89af3d1b61202c68d91
DIFF: https://github.com/llvm/llvm-project/commit/dd9bd3e8f0186b231c24a89af3d1b61202c68d91.diff

LOG: DAG: Preserve poison in combineConcatVectorOfScalars (#168220)

Added: 
    

Modified: 
    llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp

Removed: 
    


################################################################################
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);
     }


        


More information about the llvm-commits mailing list