Skip to content

Commit

Permalink
[DAG] visitINSERT_VECTOR_ELT - break if-else chain as they both retur…
Browse files Browse the repository at this point in the history
…n (style). NFC.
  • Loading branch information
RKSimon committed Feb 7, 2022
1 parent d7be2bf commit 74555fd
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -18933,10 +18933,9 @@ SDValue DAGCombiner::visitINSERT_VECTOR_ELT(SDNode *N) {
if (InVec.isUndef() && TLI.shouldSplatInsEltVarIndex(VT)) {
if (VT.isScalableVector())
return DAG.getSplatVector(VT, DL, InVal);
else {
SmallVector<SDValue, 8> Ops(VT.getVectorNumElements(), InVal);
return DAG.getBuildVector(VT, DL, Ops);
}

SmallVector<SDValue, 8> Ops(VT.getVectorNumElements(), InVal);
return DAG.getBuildVector(VT, DL, Ops);
}
return SDValue();
}
Expand Down

0 comments on commit 74555fd

Please sign in to comment.