Index: llvm/lib/Target/AMDGPU/SIISelLowering.cpp =================================================================== --- llvm/lib/Target/AMDGPU/SIISelLowering.cpp +++ llvm/lib/Target/AMDGPU/SIISelLowering.cpp @@ -12122,10 +12122,9 @@ // floating point atomic instructions. May generate more efficient code, // but may not respect rounding and denormal modes, and may give incorrect // results for certain memory destinations. - if (!fpModeMatchesGlobalFPAtomicMode(RMW) && - RMW->getFunction() - ->getFnAttribute("amdgpu-unsafe-fp-atomics") - .getValueAsString() != "true") + if (RMW->getFunction() + ->getFnAttribute("amdgpu-unsafe-fp-atomics") + .getValueAsString() != "true") return AtomicExpansionKind::CmpXChg; if (Subtarget->hasGFX90AInsts()) {