================
@@ -11825,17 +11840,8 @@ Expected<std::pair<Value *, Value *>>
OpenMPIRBuilder::emitAtomicUpdate(
if (emitRMWOp) {
AtomicRMWInst *RMWInst =
Builder.CreateAtomicRMW(RMWOp, X, Expr, llvm::MaybeAlign(), AO);
- if (IsIgnoreDenormalMode)
- RMWInst->setMetadata(llvm::LLVMContext::MD_atomic_ignore_denormal_mode,
- llvm::MDNode::get(Builder.getContext(), {}));
- if (T.isAMDGPU()) {
- if (!IsFineGrainedMemory)
- RMWInst->setMetadata("amdgpu.no.fine.grained.memory",
- llvm::MDNode::get(Builder.getContext(), {}));
- if (!IsRemoteMemory)
- RMWInst->setMetadata("amdgpu.no.remote.memory",
- llvm::MDNode::get(Builder.getContext(), {}));
- }
+ setAtomicRMWMetadata(RMWInst, T, IsIgnoreDenormalMode, IsFineGrainedMemory,
+ IsRemoteMemory);
----------------
mjklemm wrote:
Doesn't this also apply to atomics on type `int`?
https://github.com/llvm/llvm-project/pull/240421
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits