Skip to content

Commit

Permalink
[AMDGPU] NFC: get string for a single scope
Browse files Browse the repository at this point in the history
  • Loading branch information
gonzalobg committed Sep 23, 2024
1 parent 2f3a41c commit 51d29ef
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions llvm/lib/Target/AMDGPU/SIISelLowering.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -16142,11 +16142,8 @@ static bool atomicIgnoresDenormalModeOrFPModeIsFTZ(const AtomicRMWInst *RMW) {

static OptimizationRemark emitAtomicRMWLegalRemark(const AtomicRMWInst *RMW) {
LLVMContext &Ctx = RMW->getContext();
SmallVector<StringRef> SSNs;
Ctx.getSyncScopeNames(SSNs);
StringRef MemScope = SSNs[RMW->getSyncScopeID()].empty()
? "system"
: SSNs[RMW->getSyncScopeID()];
StringRef SS = Ctx.getSyncScopeName(RMW->getSyncScopeID());
StringRef MemScope = SS.empty()? StringRef("system") : SS;

return OptimizationRemark(DEBUG_TYPE, "Passed", RMW)
<< "Hardware instruction generated for atomic "
Expand Down

0 comments on commit 51d29ef

Please sign in to comment.