[llvm] [AArch64][InstCombine] Eliminate redundant barrier intrinsics (PR #112023)

via llvm-commits llvm-commits at lists.llvm.org
Fri Oct 11 10:04:37 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 222d8fadb458d9b27c27e3314337ac3771b1d33b 9f6659b0f08c4782363fb7f7f2402b05313c4288 --extensions cpp -- llvm/lib/Target/AArch64/AArch64TargetTransformInfo.cpp
``````````

</details>

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

``````````diff
diff --git a/llvm/lib/Target/AArch64/AArch64TargetTransformInfo.cpp b/llvm/lib/Target/AArch64/AArch64TargetTransformInfo.cpp
index ac2ca245f3..3eae4a87ca 100644
--- a/llvm/lib/Target/AArch64/AArch64TargetTransformInfo.cpp
+++ b/llvm/lib/Target/AArch64/AArch64TargetTransformInfo.cpp
@@ -2150,13 +2150,12 @@ static std::optional<Instruction *> instCombineSVEInsr(InstCombiner &IC,
   return std::nullopt;
 }
 
-
 static std::optional<Instruction *> instCombineDMB(InstCombiner &IC,
                                                    IntrinsicInst &II) {
   // If this barrier is post-dominated by identical one we can remove it
   auto *NI = II.getNextNonDebugInstruction();
   int LookaheadThreshold = 10;
-  auto CanSkipOver = [](Instruction *I){
+  auto CanSkipOver = [](Instruction *I) {
     return !I->mayReadOrWriteMemory() && !I->mayHaveSideEffects();
   };
   while (--LookaheadThreshold && !isa<IntrinsicInst>(NI)) {

``````````

</details>


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


More information about the llvm-commits mailing list