[PATCH] D100785: [InstCombine] Enhance deduction of alignment for aligned_alloc

Johannes Doerfert via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Apr 19 12:45:19 PDT 2021


jdoerfert accepted this revision.
jdoerfert added a comment.
This revision is now accepted and ready to land.

> The function aligned_alloc() is the same as memalign(), except for the added restriction that size should be a multiple of alignment. So for a non-zero alignment size need to be non-zero.

I don't think the last part is true, 0 x Alignment = 0. That said, for non-zero sizes we know alignment holds, so this is fine.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D100785



More information about the llvm-commits mailing list