[llvm] [NFC][AArch64] Refactor AArch64LoopIdiomTransform in preparation for more idioms (PR #78471)

via llvm-commits llvm-commits at lists.llvm.org
Wed Jan 17 08:48:08 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 fca6992be1f272f5e997bd510ca03c9389550c13 e03615a5d5c9b5aa004afd590ea1546ae9130a21 -- llvm/lib/Target/AArch64/AArch64LoopIdiomTransform.cpp
``````````

</details>

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

``````````diff
diff --git a/llvm/lib/Target/AArch64/AArch64LoopIdiomTransform.cpp b/llvm/lib/Target/AArch64/AArch64LoopIdiomTransform.cpp
index 5b48d5be15..f66e986f58 100644
--- a/llvm/lib/Target/AArch64/AArch64LoopIdiomTransform.cpp
+++ b/llvm/lib/Target/AArch64/AArch64LoopIdiomTransform.cpp
@@ -346,8 +346,7 @@ bool MemCompareIdiom::checkEndAndFoundBlockPhis(Value *IndVal) {
       // same as the end value (MaxLen) so we permit either. Otherwise for any
       // other value defined outside the loop we only allow values that are the
       // same as the exit value for while.body.
-      if (V1 != V2 &&
-          ((V1 != IndVal && V1 != MaxLen) || (V2 != IndVal)))
+      if (V1 != V2 && ((V1 != IndVal && V1 != MaxLen) || (V2 != IndVal)))
         return false;
     }
   }

``````````

</details>


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


More information about the llvm-commits mailing list