[clang] [llvm] [RISCV][LLVM] Enable atomics for 'Zalrsc' (PR #163672)

via cfe-commits cfe-commits at lists.llvm.org
Wed Oct 15 23:17:59 PDT 2025


================
@@ -225,7 +225,7 @@ class LLVM_LIBRARY_VISIBILITY RISCV64TargetInfo : public RISCVTargetInfo {
   void setMaxAtomicWidth() override {
     MaxAtomicPromoteWidth = 128;
 
-    if (ISAInfo->hasExtension("a"))
+    if (ISAInfo->hasExtension("a") || ISAInfo->hasExtension("zalrsc"))
----------------
slachowsky wrote:

It does, and we could drop the redundant "a" clause.  I could be in the wrong here coding-style wise, but my thinking was that "a" for atomic is well known, and "zalrsc" is not, so there is some benefit to readability / grep-ability.

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


More information about the cfe-commits mailing list