[PATCH] D120133: [instsimplify] Assume storage for byval args doesn't overlap allocas, globals, or other byval args

Philip Reames via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Feb 18 08:28:40 PST 2022


reames added inline comments.


================
Comment at: llvm/lib/Analysis/InstructionSimplify.cpp:2654
       Opts.NullIsUnknownSize =
-          NullPointerIsDefined(cast<AllocaInst>(LHS)->getFunction());
+        !CxtI || NullPointerIsDefined(CxtI->getFunction());
       if (getObjectSize(LHS, LHSSize, DL, TLI, Opts) &&
----------------
fhahn wrote:
> Could this lead to a regression where `CtxI` is nullptr but `LHS` is an instruction?
In theory, yes.  I'll rewrite to assume either alloca or argument for now.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D120133/new/

https://reviews.llvm.org/D120133



More information about the llvm-commits mailing list