Skip to content

Commit dd9bd3e

Browse files
authored
DAG: Preserve poison in combineConcatVectorOfScalars (#168220)
1 parent 13b6d9a commit dd9bd3e

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25465,7 +25465,7 @@ static SDValue combineConcatVectorOfScalars(SDNode *N, SelectionDAG &DAG) {
2546525465
!Op.getOperand(0).getValueType().isVector())
2546625466
Ops.push_back(Op.getOperand(0));
2546725467
else if (Op.isUndef())
25468-
Ops.push_back(DAG.getNode(ISD::UNDEF, DL, SVT));
25468+
Ops.push_back(DAG.getNode(Op.getOpcode(), DL, SVT));
2546925469
else
2547025470
return SDValue();
2547125471

@@ -25487,7 +25487,7 @@ static SDValue combineConcatVectorOfScalars(SDNode *N, SelectionDAG &DAG) {
2548725487
if (Op.getValueType() == SVT)
2548825488
continue;
2548925489
if (Op.isUndef())
25490-
Op = DAG.getNode(ISD::UNDEF, DL, SVT);
25490+
Op = DAG.getNode(Op.getOpcode(), DL, SVT);
2549125491
else
2549225492
Op = DAG.getBitcast(SVT, Op);
2549325493
}

0 commit comments

Comments
 (0)