[Mlir-commits] [mlir] [mlir][scf] Fix `for-loop-peeling` crash (PR #77697)

llvmlistbot at llvm.org llvmlistbot at llvm.org
Wed Jan 10 14:25:31 PST 2024


github-actions[bot] wrote:

<!--LLVM CODE FORMAT COMMENT: {clang-format}-->


:warning: C/C++ code formatter, clang-format found issues in your code. :warning:

<details>
<summary>
You can test this locally with the following command:
</summary>

``````````bash
git-clang-format --diff 92e243173c09fc78c25814a7d7e392971034f5be 37a69d8444cdd3b6e1eb0d5d5133843b420a320f -- mlir/include/mlir/Dialect/Affine/IR/AffineOps.h mlir/lib/Dialect/SCF/Transforms/LoopSpecialization.cpp
``````````

</details>

<details>
<summary>
View the diff from clang-format here.
</summary>

``````````diff
diff --git a/mlir/lib/Dialect/SCF/Transforms/LoopSpecialization.cpp b/mlir/lib/Dialect/SCF/Transforms/LoopSpecialization.cpp
index 7aa1f768b3..e0ef412cad 100644
--- a/mlir/lib/Dialect/SCF/Transforms/LoopSpecialization.cpp
+++ b/mlir/lib/Dialect/SCF/Transforms/LoopSpecialization.cpp
@@ -123,7 +123,8 @@ static LogicalResult peelForLoop(RewriterBase &b, ForOp forOp,
   auto ubInt = getConstantIntValue(forOp.getUpperBound());
   auto stepInt = getConstantIntValue(forOp.getStep());
 
-  // No specialization necessary if step size is 1. Also bail out in case of a zero step which might have happened during folding.
+  // No specialization necessary if step size is 1. Also bail out in case of a
+  // zero step which might have happened during folding.
   if (stepInt == static_cast<int64_t>(1) || stepInt == static_cast<int64_t>(0))
     return failure();
 

``````````

</details>


https://github.com/llvm/llvm-project/pull/77697


More information about the Mlir-commits mailing list