================
@@ -6356,6 +6356,88 @@ SDValue 
AArch64TargetLowering::LowerINTRINSIC_VOID(SDValue Op,
                        Op.getOperand(0),                        // Chain
                        DAG.getTargetConstant(24, DL, MVT::i32), // Rt
                        Op.getOperand(2));                       // Addr
+  case Intrinsic::aarch64_stshh: {
+    SDValue Chain = Op.getOperand(0);
+    auto *PolicyC = cast<ConstantSDNode>(Op.getOperand(2));
+    SDValue Policy =
+        DAG.getTargetConstant(PolicyC->getZExtValue(), DL, MVT::i32);
+    SDValue Ops[] = {Policy, Chain};
+    MachineSDNode *N = DAG.getMachineNode(AArch64::STSHH, DL, MVT::Other, Ops);
+    return SDValue(N, 0);
+  }
+  case Intrinsic::aarch64_stshh_atomic_store: {
----------------
kmclaughlin-arm wrote:

Sorry if I've misunderstood anything, but I'm not sure why we have two 
intrinsics now? I can see from `expandSTSHHAtomicStore` that we should be 
creating a store when the pseudo is expanded, but this also seems to be 
happening here.
Also, if I remove this whole block handling `aarch64_stshh_atomic_store` then 
the tests still pass - maybe this is because the tests are still using 
`aarch64_stshh`?

https://github.com/llvm/llvm-project/pull/181386
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to