[PATCH] D108150: [Remarks] Emit optimization remarks for atomics generating hardware instructions
Stanislav Mekhanoshin via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Mon Aug 16 12:30:58 PDT 2021
rampitec added a comment.
- Add [AMDGPU] to the title.
- Rebase on top of D106891 <https://reviews.llvm.org/D106891>.
- Add tests to atomics-remarks-gfx90a.ll as well, including LDS with matching and non-matching rounding mode.
================
Comment at: llvm/lib/Target/AMDGPU/SIISelLowering.cpp:12194
if (!Ty->isDoubleTy())
- return AtomicExpansionKind::None;
+ return reportUnsafeHWInst(RMW, AtomicExpansionKind::None);
----------------
This is safe.
================
Comment at: llvm/lib/Target/AMDGPU/SIISelLowering.cpp:12200
.getValueAsString() == "true")
- ? AtomicExpansionKind::None
+ ? reportUnsafeHWInst(RMW, AtomicExpansionKind::None)
: AtomicExpansionKind::CmpXChg;
----------------
This is safe if `fpModeMatchesGlobalFPAtomicMode(RMW)` returned true and unsafe if not.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D108150/new/
https://reviews.llvm.org/D108150
More information about the cfe-commits
mailing list