[llvm] [llvm][aarch64] Add support for the MS qualifiers __ptr32, __ptr64, _sptr, __uptr (PR #112793)

Eli Friedman via llvm-commits llvm-commits at lists.llvm.org
Wed Jan 29 13:46:19 PST 2025


================
@@ -23740,6 +23776,26 @@ static SDValue performLOADCombine(SDNode *N,
     performTBISimplification(N->getOperand(1), DCI, DAG);
 
   LoadSDNode *LD = cast<LoadSDNode>(N);
+  EVT RegVT = LD->getValueType(0);
+  EVT MemVT = LD->getMemoryVT();
+  const TargetLowering &TLI = DAG.getTargetLoweringInfo();
+  SDLoc DL(LD);
+
+  // Cast ptr32 and ptr64 pointers to the default address space before a load.
----------------
efriedma-quic wrote:

Conventionally, this is more of a legalization thing, not a DAGCombine thing... but I guess it won't actually cause any issues to run it a combine; it'll run before legalization, and nothing inside SelectionDAG should be producing operations in these address-spaces.

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


More information about the llvm-commits mailing list