@@ -23447,9 +23447,7 @@ static SDValue combineConcatVectorOfScalars(SDNode *N, SelectionDAG &DAG) {
23447
23447
SDLoc DL(N);
23448
23448
EVT VT = N->getValueType(0);
23449
23449
SmallVector<SDValue, 8> Ops;
23450
-
23451
23450
EVT SVT = EVT::getIntegerVT(*DAG.getContext(), OpVT.getSizeInBits());
23452
- SDValue ScalarUndef = DAG.getNode(ISD::UNDEF, DL, SVT);
23453
23451
23454
23452
// Keep track of what we encounter.
23455
23453
bool AnyInteger = false;
@@ -23459,7 +23457,7 @@ static SDValue combineConcatVectorOfScalars(SDNode *N, SelectionDAG &DAG) {
23459
23457
!Op.getOperand(0).getValueType().isVector())
23460
23458
Ops.push_back(Op.getOperand(0));
23461
23459
else if (ISD::UNDEF == Op.getOpcode())
23462
- Ops.push_back(ScalarUndef );
23460
+ Ops.push_back(DAG.getNode(ISD::UNDEF, DL, SVT) );
23463
23461
else
23464
23462
return SDValue();
23465
23463
@@ -23479,13 +23477,12 @@ static SDValue combineConcatVectorOfScalars(SDNode *N, SelectionDAG &DAG) {
23479
23477
// Replace UNDEFs by another scalar UNDEF node, of the final desired type.
23480
23478
if (AnyFP) {
23481
23479
SVT = EVT::getFloatingPointVT(OpVT.getSizeInBits());
23482
- ScalarUndef = DAG.getNode(ISD::UNDEF, DL, SVT);
23483
23480
if (AnyInteger) {
23484
23481
for (SDValue &Op : Ops) {
23485
23482
if (Op.getValueType() == SVT)
23486
23483
continue;
23487
23484
if (Op.isUndef())
23488
- Op = ScalarUndef ;
23485
+ Op = DAG.getNode(ISD::UNDEF, DL, SVT) ;
23489
23486
else
23490
23487
Op = DAG.getBitcast(SVT, Op);
23491
23488
}
0 commit comments