[Mlir-commits] [mlir] 9f7de08 - Apply clang-tidy fixes for llvm-else-after-return in SparseVectorization.cpp (NFC)

Mehdi Amini llvmlistbot at llvm.org
Thu Dec 22 07:33:17 PST 2022


Author: Mehdi Amini
Date: 2022-12-22T15:33:01Z
New Revision: 9f7de08ba6b597582bacf0cbce56e895e27b64ac

URL: https://github.com/llvm/llvm-project/commit/9f7de08ba6b597582bacf0cbce56e895e27b64ac
DIFF: https://github.com/llvm/llvm-project/commit/9f7de08ba6b597582bacf0cbce56e895e27b64ac.diff

LOG: Apply clang-tidy fixes for llvm-else-after-return in SparseVectorization.cpp (NFC)

Added: 
    

Modified: 
    mlir/lib/Dialect/SparseTensor/Transforms/SparseVectorization.cpp

Removed: 
    


################################################################################
diff  --git a/mlir/lib/Dialect/SparseTensor/Transforms/SparseVectorization.cpp b/mlir/lib/Dialect/SparseTensor/Transforms/SparseVectorization.cpp
index 994b2cf10cc33..65af4e0e1e868 100644
--- a/mlir/lib/Dialect/SparseTensor/Transforms/SparseVectorization.cpp
+++ b/mlir/lib/Dialect/SparseTensor/Transforms/SparseVectorization.cpp
@@ -380,14 +380,12 @@ static bool vectorizeExpr(PatternRewriter &rewriter, scf::ForOp forOp, VL vl,
         vexp = rewriter.create<arith::AddIOp>(loc, veci, incr);
       }
       return true;
-    } else {
-      // An invariant or reduction. In both cases, we treat this as an
+    } // An invariant or reduction. In both cases, we treat this as an
       // invariant value, and rely on later replacing and folding to
       // construct a proper reduction chain for the latter case.
       if (codegen)
         vexp = genVectorInvariantValue(rewriter, vl, exp);
       return true;
-    }
   }
   // Something defined outside the loop-body is invariant.
   Operation *def = exp.getDefiningOp();


        


More information about the Mlir-commits mailing list