[PATCH] D125639: [NVPTX] Enable AtomicExpandPass for NVPTX
Shilei Tian via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Sun May 15 11:25:22 PDT 2022
tianshilei1992 added inline comments.
================
Comment at: llvm/lib/CodeGen/AtomicExpandPass.cpp:257
if (LI) {
- if (LI->getType()->isFloatingPointTy()) {
- // TODO: add a TLI hook to control this so that each target can
- // convert to lowering the original type one at a time.
- LI = convertAtomicLoadToIntegerType(LI);
- assert(LI->getType()->isIntegerTy() && "invariant broken");
- MadeChange = true;
- }
+ if (TLI->shouldExpandAtomicLoadInIR(LI) !=
+ TargetLoweringBase::AtomicExpansionKind::None) {
----------------
Some targets, such as NVPTX, supports atomic load and store of floating-point variables. We don't need to convert it to integer.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D125639/new/
https://reviews.llvm.org/D125639
More information about the llvm-commits
mailing list