[Mlir-commits] [mlir] [mlir][linalg] Remove redundant checks for variable(NFC) (PR #122731)
llvmlistbot at llvm.org
llvmlistbot at llvm.org
Mon Jan 13 07:49:42 PST 2025
llvmbot wrote:
<!--LLVM PR SUMMARY COMMENT-->
@llvm/pr-subscribers-mlir-linalg
Author: Longsheng Mou (CoTinker)
<details>
<summary>Changes</summary>
This PR removes the redundant checks for the `supported` variable, as it's guaranteed to be true.
---
Full diff: https://github.com/llvm/llvm-project/pull/122731.diff
1 Files Affected:
- (modified) mlir/lib/Dialect/Linalg/TransformOps/LinalgTransformOps.cpp (+2-2)
``````````diff
diff --git a/mlir/lib/Dialect/Linalg/TransformOps/LinalgTransformOps.cpp b/mlir/lib/Dialect/Linalg/TransformOps/LinalgTransformOps.cpp
index a1d619c8cd19dc..a596a2ffdc9d93 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";
``````````
</details>
https://github.com/llvm/llvm-project/pull/122731
More information about the Mlir-commits
mailing list