[llvm] [RISCV] Emitting proper atomic ABI tag when Zalasr is enabled (PR #121017)

via llvm-commits llvm-commits at lists.llvm.org
Mon Dec 23 16:41:43 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 9d0a5d4620a2aa5dc01b150e5ebe7613238cae1c 64c6259f1f6d92dc42034c0bb95add23e28d1f42 --extensions cpp -- llvm/lib/Target/RISCV/MCTargetDesc/RISCVTargetStreamer.cpp
``````````

</details>

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

``````````diff
diff --git a/llvm/lib/Target/RISCV/MCTargetDesc/RISCVTargetStreamer.cpp b/llvm/lib/Target/RISCV/MCTargetDesc/RISCVTargetStreamer.cpp
index 6035dffaa8..32b19abe58 100644
--- a/llvm/lib/Target/RISCV/MCTargetDesc/RISCVTargetStreamer.cpp
+++ b/llvm/lib/Target/RISCV/MCTargetDesc/RISCVTargetStreamer.cpp
@@ -88,9 +88,9 @@ void RISCVTargetStreamer::emitTargetAttributes(const MCSubtargetInfo &STI,
     unsigned AtomicABITag = static_cast<unsigned>(
         STI.hasFeature(RISCV::FeatureStdExtZalasr)
             ? RISCVAttrs::RISCVAtomicAbiTag::A7
-            : STI.hasFeature(RISCV::FeatureNoTrailingSeqCstFence)
-              ? RISCVAttrs::RISCVAtomicAbiTag::A6C
-              : RISCVAttrs::RISCVAtomicAbiTag::A6S);
+        : STI.hasFeature(RISCV::FeatureNoTrailingSeqCstFence)
+            ? RISCVAttrs::RISCVAtomicAbiTag::A6C
+            : RISCVAttrs::RISCVAtomicAbiTag::A6S);
     emitAttribute(RISCVAttrs::ATOMIC_ABI, AtomicABITag);
   }
 }

``````````

</details>


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


More information about the llvm-commits mailing list