[clang] [clang][ARM] Add the MSVC compiler barriers for 32-bit Arm (PR #240572)

via cfe-commits cfe-commits at lists.llvm.org
Mon Nov 9 18:00:46 PST 2026


================
@@ -2208,6 +2208,12 @@ Value *CodeGenFunction::EmitARMBuiltinExpr(unsigned BuiltinID,
     return Builder.CreateCall(Emit);
   }
 
+  if (BuiltinID == clang::ARM::BI_ReadWriteBarrier ||
+      BuiltinID == clang::ARM::BI_ReadBarrier ||
+      BuiltinID == clang::ARM::BI_WriteBarrier)
+    return Builder.CreateFence(llvm::AtomicOrdering::SequentiallyConsistent,
----------------
hamed7ir wrote:

Done: they lower through MSVCIntrin now, and x86 and AArch64 use it too. CIR's x86 path uses the same translateX86ToMsvcIntrin, so its copy moved into its MSVCIntrin switch as well.

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


More information about the cfe-commits mailing list