[llvm] [InstCombine] Don't consider aligned_alloc removable if icmp uses result (PR #69474)

Yingwei Zheng via llvm-commits llvm-commits at lists.llvm.org
Wed Oct 18 09:00:30 PDT 2023


dtcxzyw wrote:

> I think aligned_alloc only fails with bad alignment if its a non-pow2. Maybe only do this if alignment is not provably a pow2?

> Fundamental alignments are always supported. If alignment is a power of two and not greater than _Alignof([max_align_t](http://en.cppreference.com/w/c/types/max_align_t)), aligned_alloc may simply call [malloc](https://en.cppreference.com/w/c/memory/malloc).

Reference: https://en.cppreference.com/w/c/memory/aligned_alloc

https://github.com/llvm/llvm-project/pull/69474


More information about the llvm-commits mailing list