[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
Thu Feb 29 02:32:13 PST 2024
================
@@ -1742,7 +1758,44 @@ void SystemZDAGToDAGISel::Select(SDNode *Node) {
}
break;
}
+
+ case ISD::ATOMIC_STORE: {
+ auto *AtomOp = cast<AtomicSDNode>(Node);
+ // Store FP values directly without first moving to a GPR. This is needed
+ // as long as clang always emits the cast to integer.
+ EVT SVT = AtomOp->getMemoryVT();
+ SDValue StoredVal = AtomOp->getVal();
+ if (SVT.isInteger() && StoredVal->getOpcode() == ISD::BITCAST &&
+ StoredVal->getOperand(0).getValueType().isFloatingPoint()) {
----------------
arsenm wrote:
can you instead just make the FP typed atomic_store legal? I would assume the cast + load/store get folded together
https://github.com/llvm/llvm-project/pull/75879
More information about the llvm-commits
mailing list