[PATCH] D144759: [AMDGPU] Implement idempotent atomic lowering
Matt Arsenault via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Mar 2 11:38:03 PST 2023
arsenm added inline comments.
================
Comment at: llvm/lib/Target/AMDGPU/SIISelLowering.cpp:13371-13377
+ // We do not need to insert a fence here, memory legalizer will do.
+ LoadInst *LI = Builder.CreateAlignedLoad(
+ AI->getType(), AI->getPointerOperand(), AI->getAlign());
+ LI->setAtomic(Order, SSID);
+ LI->copyMetadata(*AI);
+ LI->takeName(AI);
+ AI->replaceAllUsesWith(LI);
----------------
I don't understand why this is a target hook. Why can't this unconditionally happen in the generic code?
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D144759/new/
https://reviews.llvm.org/D144759
More information about the llvm-commits
mailing list