[llvm] [CodeGen] Add SSID & Atomic Ordering to IntrinsicInfo (PR #140896)

Pierre van Houtryve via llvm-commits llvm-commits at lists.llvm.org
Thu May 22 00:43:16 PDT 2025


================
@@ -5305,9 +5305,16 @@ void SelectionDAGBuilder::visitTargetIntrinsic(const CallInst &I,
       MPI = MachinePointerInfo(Info.ptrVal, Info.offset);
     else if (Info.fallbackAddressSpace)
       MPI = MachinePointerInfo(*Info.fallbackAddressSpace);
-    Result = DAG.getMemIntrinsicNode(
-        Info.opc, getCurSDLoc(), VTs, Ops, Info.memVT, MPI, Info.align,
-        Info.flags, LocationSize::precise(Info.size), I.getAAMetadata());
+    EVT MemVT = Info.memVT;
+    LocationSize Size = LocationSize::precise(Info.size);
+    if (Size.hasValue() && !Size.getValue())
+      Size = LocationSize::precise(MemVT.getStoreSize());
+    Align Alignment = Info.align.value_or(DAG.getEVTAlign(MemVT));
----------------
Pierre-vh wrote:

Some targets use `.reset()` to make TLI infer the size based on memVT
AMDGPU, NVPTX and AArch64 all do it



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


More information about the llvm-commits mailing list