[PATCH] D116816: [instcombine] Delete duplicate object size logic

Philip Reames via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Jan 7 08:58:45 PST 2022


reames added inline comments.


================
Comment at: llvm/lib/Transforms/InstCombine/InstCombineCalls.cpp:2578
+  if (getObjectSize(&Call, Size, DL, TLI, Opts) && Size > 0) {
+    // TODO: should be annotating these nonnull
     if (isOpNewLikeFn(&Call, TLI))
----------------
xbolva00 wrote:
> all allocation fns have nonnull attribute, I believe.
Er, definitely not.  Malloc can return nullptr on error.  Did you maybe mean that all operator new versions did?  I couldn't find that code, can you point me to it?


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D116816



More information about the llvm-commits mailing list