[Mlir-commits] [mlir] 6a7a118 - Apply clang-tidy fixes for llvm-else-after-return in VectorToGPU.cpp (NFC)

Mehdi Amini llvmlistbot at llvm.org
Sun Nov 6 12:19:27 PST 2022


Author: Mehdi Amini
Date: 2022-11-06T20:15:00Z
New Revision: 6a7a1188d3bb639eb0c817484075e6c116a88ac2

URL: https://github.com/llvm/llvm-project/commit/6a7a1188d3bb639eb0c817484075e6c116a88ac2
DIFF: https://github.com/llvm/llvm-project/commit/6a7a1188d3bb639eb0c817484075e6c116a88ac2.diff

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

Added: 
    

Modified: 
    mlir/lib/Conversion/VectorToGPU/VectorToGPU.cpp

Removed: 
    


################################################################################
diff  --git a/mlir/lib/Conversion/VectorToGPU/VectorToGPU.cpp b/mlir/lib/Conversion/VectorToGPU/VectorToGPU.cpp
index 01654fdd6024a..b64b0d88a3e37 100644
--- a/mlir/lib/Conversion/VectorToGPU/VectorToGPU.cpp
+++ b/mlir/lib/Conversion/VectorToGPU/VectorToGPU.cpp
@@ -212,7 +212,7 @@ extractStridedSliceSupportsMMAMatrixType(vector::ExtractStridedSliceOp op) {
   if (warpMatrixInfo->operandRole == nvgpu::MatMulOperandRole::B)
     return (op->getResult(0).getType().cast<VectorType>() ==
             (*contractOp).getRhs().getType().cast<VectorType>());
-  else if (warpMatrixInfo->operandRole == nvgpu::MatMulOperandRole::C)
+  if (warpMatrixInfo->operandRole == nvgpu::MatMulOperandRole::C)
     return (op->getResult(0).getType().cast<VectorType>() ==
             (*contractOp).getAcc().getType().cast<VectorType>());
 
@@ -768,7 +768,7 @@ convertExtractStridedSlice(vector::ExtractStridedSliceOp op,
 
   if (offsets[0] && offsets[1])
     return op->emitError() << "Slicing fragments in 2D is not supported. ";
-  else if (offsets[0])
+  if (offsets[0])
     sliceOffset[0] = (warpVectorShape[0] / offsets[0]);
   else if (offsets[1])
     sliceOffset[0] = (warpVectorShape[1] / offsets[1]);


        


More information about the Mlir-commits mailing list