[flang-commits] [flang] [flang] Correctly handle `!dir$ unroll` with unrolling factors of 0 and 1 (PR #126170)
via flang-commits
flang-commits at lists.llvm.org
Thu Feb 6 18:22:28 PST 2025
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 6807164500e9920638e2ab0cdb4bf8321d24f8eb 71c5dec3db8e51f6f31098fe9c3b8636f1e6dba5 --extensions cpp -- flang/lib/Lower/Bridge.cpp
``````````
</details>
<details>
<summary>
View the diff from clang-format here.
</summary>
``````````diff
diff --git a/flang/lib/Lower/Bridge.cpp b/flang/lib/Lower/Bridge.cpp
index 5f3f918815..36e58e456d 100644
--- a/flang/lib/Lower/Bridge.cpp
+++ b/flang/lib/Lower/Bridge.cpp
@@ -2176,7 +2176,8 @@ private:
// force unrolling with the given factor. Otherwise, disable unrolling.
mlir::LLVM::LoopUnrollAttr
genLoopUnrollAttr(std::optional<std::uint64_t> directiveArg) {
- mlir::BoolAttr falseAttr = mlir::BoolAttr::get(builder->getContext(), false);
+ mlir::BoolAttr falseAttr =
+ mlir::BoolAttr::get(builder->getContext(), false);
mlir::BoolAttr trueAttr = mlir::BoolAttr::get(builder->getContext(), true);
mlir::IntegerAttr countAttr;
mlir::BoolAttr fullUnrollAttr;
@@ -2186,7 +2187,8 @@ private:
if (unrollingFactor == 0 || unrollingFactor == 1) {
shouldUnroll = false;
} else {
- countAttr = builder->getIntegerAttr(builder->getI64Type(), unrollingFactor);
+ countAttr =
+ builder->getIntegerAttr(builder->getI64Type(), unrollingFactor);
}
} else {
fullUnrollAttr = trueAttr;
``````````
</details>
https://github.com/llvm/llvm-project/pull/126170
More information about the flang-commits
mailing list