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

Craig Topper via cfe-commits cfe-commits at lists.llvm.org
Thu Oct 16 16:38:44 PDT 2025


================
@@ -192,8 +192,11 @@ void RISCVTargetInfo::getTargetDefines(const LangOptions &Opts,
     Builder.defineMacro("__riscv_muldiv");
   }
 
-  if (ISAInfo->hasExtension("a")) {
+  // The "a" extension is composed of "zalrsc" and "zaamo"
+  if (ISAInfo->hasExtension("zalrsc") && ISAInfo->hasExtension("zaamo"))
----------------
topperc wrote:

I think this should stay "a". I put up https://github.com/llvm/llvm-project/pull/163890 to make Zalrsc+Zaamo imply A.

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


More information about the cfe-commits mailing list