[Mlir-commits] [mlir] a854982 - Apply clang-tidy fixes for readability-simplify-boolean-expr in TensorOps.cpp (NFC)

Mehdi Amini llvmlistbot at llvm.org
Tue Feb 13 20:57:38 PST 2024


Author: Mehdi Amini
Date: 2024-02-13T20:56:05-08:00
New Revision: a854982aa10725571409c367ab59da7c809b59f4

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

LOG: Apply clang-tidy fixes for readability-simplify-boolean-expr in TensorOps.cpp (NFC)

Added: 
    

Modified: 
    mlir/lib/Dialect/Tensor/IR/TensorOps.cpp

Removed: 
    


################################################################################
diff  --git a/mlir/lib/Dialect/Tensor/IR/TensorOps.cpp b/mlir/lib/Dialect/Tensor/IR/TensorOps.cpp
index 945e8eb4e0f92b..303b38c70d747f 100644
--- a/mlir/lib/Dialect/Tensor/IR/TensorOps.cpp
+++ b/mlir/lib/Dialect/Tensor/IR/TensorOps.cpp
@@ -2797,7 +2797,7 @@ RankedTensorType PadOp::inferResultType(RankedTensorType sourceType,
     return RankedTensorType();
   if (staticHigh.size() != rank)
     return RankedTensorType();
-  if (!(resultShape.empty() || resultShape.size() == rank))
+  if (!resultShape.empty() && resultShape.size() != rank)
     return RankedTensorType();
 
   SmallVector<int64_t, 4> inferredShape;


        


More information about the Mlir-commits mailing list