[llvm] [AMDGPU] Simplify emitAtomicRMWLegalRemark. NFC. (PR #134614)
via llvm-commits
llvm-commits at lists.llvm.org
Mon Apr 7 04:19:10 PDT 2025
llvmbot wrote:
<!--LLVM PR SUMMARY COMMENT-->
@llvm/pr-subscribers-backend-amdgpu
Author: Jay Foad (jayfoad)
<details>
<summary>Changes</summary>
---
Full diff: https://github.com/llvm/llvm-project/pull/134614.diff
1 Files Affected:
- (modified) llvm/lib/Target/AMDGPU/SIISelLowering.cpp (+2-2)
``````````diff
diff --git a/llvm/lib/Target/AMDGPU/SIISelLowering.cpp b/llvm/lib/Target/AMDGPU/SIISelLowering.cpp
index 21f8c7cfeec1f..356040da95672 100644
--- a/llvm/lib/Target/AMDGPU/SIISelLowering.cpp
+++ b/llvm/lib/Target/AMDGPU/SIISelLowering.cpp
@@ -16723,8 +16723,8 @@ static bool atomicIgnoresDenormalModeOrFPModeIsFTZ(const AtomicRMWInst *RMW) {
static OptimizationRemark emitAtomicRMWLegalRemark(const AtomicRMWInst *RMW) {
LLVMContext &Ctx = RMW->getContext();
- StringRef SS = Ctx.getSyncScopeName(RMW->getSyncScopeID()).value_or("");
- StringRef MemScope = SS.empty() ? StringRef("system") : SS;
+ StringRef MemScope =
+ Ctx.getSyncScopeName(RMW->getSyncScopeID()).value_or("system");
return OptimizationRemark(DEBUG_TYPE, "Passed", RMW)
<< "Hardware instruction generated for atomic "
``````````
</details>
https://github.com/llvm/llvm-project/pull/134614
More information about the llvm-commits
mailing list