[llvm] LowerAtomic: Preserve the volatile flag when lowering atomicrmw and cmpxchg (PR #223544)
Matt Arsenault via llvm-commits
llvm-commits at lists.llvm.org
Mon Sep 14 23:55:12 PDT 2026
================
@@ -25,10 +25,9 @@ LLVM_ABI bool lowerAtomicCmpXchgInst(AtomicCmpXchgInst *CXI);
/// Emit IR to implement the given cmpxchg operation on values in registers,
/// returning the new value.
-LLVM_ABI std::pair<Value *, Value *> buildCmpXchgValue(IRBuilderBase &Builder,
- Value *Ptr, Value *Cmp,
- Value *Val,
- Align Alignment);
+LLVM_ABI std::pair<Value *, Value *>
+buildCmpXchgValue(IRBuilderBase &Builder, Value *Ptr, Value *Cmp, Value *Val,
+ Align Alignment, bool IsVolatile = false);
----------------
arsenm wrote:
Generally if you're building something out of nothing it shouldn't be volatile
https://github.com/llvm/llvm-project/pull/223544
More information about the llvm-commits
mailing list