[PATCH] D88778: [MemCpyOpt] Fix MemorySSA preservation
Alina Sbirlea via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Oct 5 13:28:32 PDT 2020
asbirlea added a comment.
Thank you for fixing this!
Could you clang-format the patch?
================
Comment at: llvm/lib/Transforms/Scalar/MemCpyOptimizer.cpp:547
+ MemoryDef *PDef = MSSAU
+ ? cast<MemoryDef>(MSSAU->getMemorySSA()->getMemoryAccess(P)) : nullptr;
for (auto *I : llvm::reverse(ToLift)) {
----------------
Is it possible for the cast here to fail?
P is known to modify the Load location a the callsite. Is it possible this is true for specific cases not modeled as MemoryDefs in MemorySSA (e.g. when using a non-standard aa pipeline, and basicaa is disabled, certain accesses are seen as "can access/modify" but are ignored in the MemorySSA modeling - see MemorySSA.cpp:1766).
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D88778/new/
https://reviews.llvm.org/D88778
More information about the llvm-commits
mailing list