[llvm] [DSE] Add predicated vector length store support for masked store elimination (PR #134175)

via llvm-commits llvm-commits at lists.llvm.org
Wed Apr 2 16:27:37 PDT 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 HEAD~1 HEAD --extensions cpp -- llvm/lib/Transforms/Scalar/DeadStoreElimination.cpp
``````````

</details>

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

``````````diff
diff --git a/llvm/lib/Transforms/Scalar/DeadStoreElimination.cpp b/llvm/lib/Transforms/Scalar/DeadStoreElimination.cpp
index 22eaeeafc..0c5cc2a54 100644
--- a/llvm/lib/Transforms/Scalar/DeadStoreElimination.cpp
+++ b/llvm/lib/Transforms/Scalar/DeadStoreElimination.cpp
@@ -296,12 +296,11 @@ static OverwriteResult isMaskedStoreOverwrite(const Instruction *KillingI,
     AAMDNodes KillingAA = KillingII->getAAMetadata();
     AAMDNodes DeadAA = DeadII->getAAMetadata();
     // There must be scoped noalias metadata on both stores.
-    if (!KillingAA.Scope || !DeadAA.Scope ||
-        !KillingAA.NoAlias || !DeadAA.NoAlias)
+    if (!KillingAA.Scope || !DeadAA.Scope || !KillingAA.NoAlias ||
+        !DeadAA.NoAlias)
       return OW_Unknown;
     // Check that both stores have the same scope and noalias metadata.
-    if (KillingAA.Scope != DeadAA.Scope ||
-        KillingAA.NoAlias != DeadAA.NoAlias)
+    if (KillingAA.Scope != DeadAA.Scope || KillingAA.NoAlias != DeadAA.NoAlias)
       return OW_Unknown;
     return OW_Complete;
   }

``````````

</details>


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


More information about the llvm-commits mailing list