[llvm] [SystemZ] Don't lower float/double ATOMIC_[LOAD|STORE] to [LOAD|STORE] (PR #75879)
Matt Arsenault via llvm-commits
llvm-commits at lists.llvm.org
Tue Jan 2 20:56:13 PST 2024
================
@@ -338,6 +338,19 @@ SDValue DAGTypeLegalizer::PromoteIntRes_Atomic0(AtomicSDNode *N) {
N->getMemoryVT(), ResVT,
N->getChain(), N->getBasePtr(),
N->getMemOperand());
+ if (N->getOpcode() == ISD::ATOMIC_LOAD) {
+ ISD::LoadExtType ETy = cast<AtomicSDNode>(N)->getExtensionType();
+ if (ETy == ISD::NON_EXTLOAD) {
+ if (TLI.getExtendForAtomicOps() == ISD::SIGN_EXTEND)
+ ETy = ISD::SEXTLOAD;
+ else if (TLI.getExtendForAtomicOps() == ISD::ZERO_EXTEND)
----------------
arsenm wrote:
switch over TLI.getExtendForAtomicOps() (terrible hook btw, one of the plusses of globalisel having G_SEXTLOAD/G_ZEXTLOAD + atomic MMO)
https://github.com/llvm/llvm-project/pull/75879
More information about the llvm-commits
mailing list