[Mlir-commits] [mlir] 565f3bd - [mlir][linalg] Remove redundant checks for variable(NFC) (#122731)

llvmlistbot at llvm.org llvmlistbot at llvm.org
Tue Jan 14 17:45:55 PST 2025


Author: Longsheng Mou
Date: 2025-01-15T09:45:51+08:00
New Revision: 565f3bd641dfdfefd9cf932cf94cc3fbd0b30d33

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

LOG: [mlir][linalg] Remove redundant checks for variable(NFC) (#122731)

This PR removes the redundant checks for the `supported` variable, as
it's guaranteed to be true.

Added: 
    

Modified: 
    mlir/lib/Dialect/Linalg/TransformOps/LinalgTransformOps.cpp

Removed: 
    


################################################################################
diff  --git a/mlir/lib/Dialect/Linalg/TransformOps/LinalgTransformOps.cpp b/mlir/lib/Dialect/Linalg/TransformOps/LinalgTransformOps.cpp
index 67dd21aafe4fe0..8f5b49e0c21306 100644
--- a/mlir/lib/Dialect/Linalg/TransformOps/LinalgTransformOps.cpp
+++ b/mlir/lib/Dialect/Linalg/TransformOps/LinalgTransformOps.cpp
@@ -3889,7 +3889,7 @@ DiagnosedSilenceableFailure transform::WinogradConv2DOp::applyToOne(
            << "this operation is not supported to convert to Winograd Conv2D";
   }
 
-  if (supported && failed(maybeTransformed)) {
+  if (failed(maybeTransformed)) {
     return emitSilenceableError() << "apply Winograd Conv2D failed";
   }
 
@@ -3927,7 +3927,7 @@ DiagnosedSilenceableFailure transform::DecomposeWinogradOp::applyToOne(
     return diag;
   }
 
-  if (supported && failed(maybeTransformed)) {
+  if (failed(maybeTransformed)) {
     DiagnosedSilenceableFailure diag =
         emitSilenceableError() << "decompose Winograd operations failed";
     diag.attachNote(target->getLoc()) << "target op";


        


More information about the Mlir-commits mailing list