[llvm] 74555fd - [DAG] visitINSERT_VECTOR_ELT - break if-else chain as they both return (style). NFC.
Simon Pilgrim via llvm-commits
llvm-commits at lists.llvm.org
Mon Feb 7 01:59:01 PST 2022
Author: Simon Pilgrim
Date: 2022-02-07T09:58:47Z
New Revision: 74555fd367fbff938e4f6487f02197c3f115276b
URL: https://github.com/llvm/llvm-project/commit/74555fd367fbff938e4f6487f02197c3f115276b
DIFF: https://github.com/llvm/llvm-project/commit/74555fd367fbff938e4f6487f02197c3f115276b.diff
LOG: [DAG] visitINSERT_VECTOR_ELT - break if-else chain as they both return (style). NFC.
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 2b0d476dbc5ab..8539c5c681f64 100644
--- a/llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
+++ b/llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
@@ -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();
}
More information about the llvm-commits
mailing list