[llvm] [SystemZ] Don't lower float/double ATOMIC_[LOAD|STORE] to [LOAD|STORE] (PR #75879)

Jonas Paulsson via llvm-commits llvm-commits at lists.llvm.org
Fri Mar 1 02:04:47 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()) {
----------------
JonPsson1 wrote:

I think this can go away after #83446 lands.

https://github.com/llvm/llvm-project/pull/75879


More information about the llvm-commits mailing list