[PATCH] D76971: Deduce attributes for aligned_alloc in InstCombine

Uday Bondhugula via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sat Mar 28 00:30:33 PDT 2020


bondhugula added inline comments.


================
Comment at: llvm/lib/Transforms/InstCombine/InstCombineCalls.cpp:4445
+                      Attribute::getWithDereferenceableOrNullBytes(
+                          Call.getContext(), Op1C->getZExtValue()));
   } else if (isReallocLikeFn(&Call, TLI) && Op1C) {
----------------
jdoerfert wrote:
> When Op0C is set (regardless of Op1C), we can set the alignment attribute on the return value, can't we?
Would it be correct to set the alignment attribute for 0 sized allocations?


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D76971





More information about the llvm-commits mailing list