Skip to content

Commit c83823a

Browse files
committed
Address review comments
1 parent 8bfd7c8 commit c83823a

File tree

1 file changed

+4
-9
lines changed

1 file changed

+4
-9
lines changed

llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp

Lines changed: 4 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -25296,15 +25296,11 @@ static SDValue combineConcatVectorOfSplats(SDNode *N, SelectionDAG &DAG,
2529625296
(LegalOperations && !TLI.isOperationLegal(ISD::SPLAT_VECTOR, VT)))
2529725297
return SDValue();
2529825298

25299-
if (!llvm::all_equal(N->op_values()) ||
25300-
N->getOperand(0).getOpcode() != ISD::SPLAT_VECTOR)
25301-
return SDValue();
25302-
25303-
SDValue Splat = DAG.getSplatValue(N->getOperand(0));
25304-
if (!Splat)
25299+
SDValue Op0 = N->getOperand(0);
25300+
if (!llvm::all_equal(N->op_values()) || Op0.getOpcode() != ISD::SPLAT_VECTOR)
2530525301
return SDValue();
2530625302

25307-
return DAG.getNode(ISD::SPLAT_VECTOR, SDLoc(N), VT, Splat);
25303+
return DAG.getNode(ISD::SPLAT_VECTOR, SDLoc(N), VT, Op0.getOperand(0));
2530825304
}
2530925305

2531025306
SDValue DAGCombiner::visitCONCAT_VECTORS(SDNode *N) {
@@ -25508,8 +25504,7 @@ SDValue DAGCombiner::visitVECTOR_INTERLEAVE(SDNode *N) {
2550825504
return SDValue();
2550925505

2551025506
// Check to see if the identical operand is a splat.
25511-
SDValue Op0 = N->getOperand(0);
25512-
SDValue Splat = DAG.getSplatValue(Op0);
25507+
SDValue Splat = DAG.getSplatValue(N->getOperand(0));
2551325508
if (!Splat)
2551425509
return SDValue();
2551525510

0 commit comments

Comments
 (0)