[llvm] [Verifier] Allow vector type in atomic load and store (PR #117625)

via llvm-commits llvm-commits at lists.llvm.org
Mon Nov 25 12:23:54 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 20bd029a40faa2ae5383dd742b8a3595b1fe7c31 4962b17a45a9bf584a6a57e42cab4c7965ffbf05 --extensions cpp -- llvm/lib/IR/Verifier.cpp
``````````

</details>

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

``````````diff
diff --git a/llvm/lib/IR/Verifier.cpp b/llvm/lib/IR/Verifier.cpp
index 83eb1ef0c2..cf37d9becb 100644
--- a/llvm/lib/IR/Verifier.cpp
+++ b/llvm/lib/IR/Verifier.cpp
@@ -4255,7 +4255,8 @@ void Verifier::visitLoadInst(LoadInst &LI) {
     Check(LI.getOrdering() != AtomicOrdering::Release &&
               LI.getOrdering() != AtomicOrdering::AcquireRelease,
           "Load cannot have Release ordering", &LI);
-    Check(ElTy->isIntOrPtrTy() || ElTy->isFloatingPointTy() || ElTy->isVectorTy(),
+    Check(ElTy->isIntOrPtrTy() || ElTy->isFloatingPointTy() ||
+              ElTy->isVectorTy(),
           "atomic load operand must have integer, pointer, floating point, "
           "or vector type!",
           ElTy, &LI);
@@ -4281,7 +4282,8 @@ void Verifier::visitStoreInst(StoreInst &SI) {
     Check(SI.getOrdering() != AtomicOrdering::Acquire &&
               SI.getOrdering() != AtomicOrdering::AcquireRelease,
           "Store cannot have Acquire ordering", &SI);
-    Check(ElTy->isIntOrPtrTy() || ElTy->isFloatingPointTy() || ElTy->isVectorTy(),
+    Check(ElTy->isIntOrPtrTy() || ElTy->isFloatingPointTy() ||
+              ElTy->isVectorTy(),
           "atomic store operand must have integer, pointer, floating point, "
           "or vector type!",
           ElTy, &SI);

``````````

</details>


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


More information about the llvm-commits mailing list