[PATCH] D121642: InstCombineCalls: when adding an align attribute, never reduce it

James Y Knight via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Apr 1 11:30:41 PDT 2022


jyknight added inline comments.


================
Comment at: llvm/test/Transforms/InstCombine/InferAlignAttribute.ll:37-39
+; IPSCCPPass is able to make my_aligned_alloc_3's arguments disappear and directly
+; call my_aligned_alloc_2, but the latter has no allocalign so the alignment just
+; disappears.
----------------
Please explicitly note that this is mildly undesirable (yet conservatively correct) behavior. We would prefer the result to have an align 128, if that were to happen.

Also would be helpful to note that it is a simplified example of what happens in practice with _mm_malloc which calls posix_memalign.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D121642



More information about the llvm-commits mailing list