[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:28:00 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());
----------------
Pierre-vh wrote:
This is borrowed from `SelectionDAG::getMemIntrinsicNode`. Without it, I get size mismatches because there is an expectation that the value is initialized if it's zero.
https://github.com/llvm/llvm-project/pull/140896
More information about the llvm-commits
mailing list