[flang] [llvm] [mlir][llvm][OpenMP] Emit llvm.stacksave and llvm.stackrestore in __atomic_compare_exchange (PR #132888)

via llvm-commits llvm-commits at lists.llvm.org
Mon Mar 31 22:53:01 PDT 2025


================
@@ -118,8 +118,14 @@ AtomicInfo::EmitAtomicLoadLibcall(AtomicOrdering AO) {
   Value *PtrVal = getAtomicPointer();
   PtrVal = Builder->CreateAddrSpaceCast(PtrVal, PointerType::getUnqual(Ctx));
   Args.push_back(PtrVal);
+
+  auto CurrentIP = Builder->saveIP();
+  BasicBlock &InsertBB =
+      Builder->GetInsertBlock()->getParent()->getEntryBlock();
----------------
NimishMishra wrote:

I will make the changes Michael requested. Thanks.

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


More information about the llvm-commits mailing list