[llvm] [CodeGen] Generate mem intrinsic address calculations with nuw (PR #80184)

Matt Arsenault via llvm-commits llvm-commits at lists.llvm.org
Thu Feb 1 01:46:07 PST 2024


================
@@ -7574,14 +7574,20 @@ static SDValue getMemcpyLoadsAndStores(SelectionDAG &DAG, const SDLoc &dl,
 
       Value = DAG.getExtLoad(
           ISD::EXTLOAD, dl, NVT, Chain,
-          DAG.getMemBasePlusOffset(Src, TypeSize::getFixed(SrcOff), dl),
+          isDereferenceable
+              ? DAG.getObjectPtrOffset(dl, Src, TypeSize::getFixed(SrcOff))
+              : DAG.getMemBasePlusOffset(Src, TypeSize::getFixed(SrcOff), dl),
----------------
arsenm wrote:

Maybe should move this to a parameter of getMemBasePlusOffset

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


More information about the llvm-commits mailing list