[llvm] [LSR][NFC] Use range-based `for` (PR #113889)

via llvm-commits llvm-commits at lists.llvm.org
Mon Oct 28 02:41:26 PDT 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 43a5719d9f54fb482d523a6e313d9b9b9af82379 e9b41dd3995373df98aaca93aac9fce0236145f6 --extensions cpp -- llvm/lib/Transforms/Scalar/LoopStrengthReduce.cpp
``````````

</details>

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

``````````diff
diff --git a/llvm/lib/Transforms/Scalar/LoopStrengthReduce.cpp b/llvm/lib/Transforms/Scalar/LoopStrengthReduce.cpp
index 6b0cace061..79174066d3 100644
--- a/llvm/lib/Transforms/Scalar/LoopStrengthReduce.cpp
+++ b/llvm/lib/Transforms/Scalar/LoopStrengthReduce.cpp
@@ -2694,8 +2694,8 @@ LSRInstance::OptimizeLoopTermCond() {
               goto decline_post_inc;
             // Check for possible scaled-address reuse.
             if (isAddressUse(TTI, UI.getUser(), UI.getOperandValToReplace())) {
-              MemAccessTy AccessTy = getAccessType(
-                  TTI, UI.getUser(), UI.getOperandValToReplace());
+              MemAccessTy AccessTy =
+                  getAccessType(TTI, UI.getUser(), UI.getOperandValToReplace());
               int64_t Scale = C->getSExtValue();
               if (TTI.isLegalAddressingMode(AccessTy.MemTy, /*BaseGV=*/nullptr,
                                             /*BaseOffset=*/0,

``````````

</details>


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


More information about the llvm-commits mailing list