Skip to content
Unverified Commit 0af5c066 authored by Florian Hahn's avatar Florian Hahn Committed by GitHub
Browse files

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

At the moment, all alloc-like functions are assumed to return non-null
pointers, if their return value is only used in a compare. This is based
on being allowed to substitute the allocation function with one that
doesn't fail to allocate the required memory.

aligned_alloc however must also return null if the required alignment
cannot be satisfied, so I don't think the same reasoning as above can be
applied to it.

This patch adds a bail-out for aligned_alloc calls to
isAllocSiteRemovable.
parent 44d4b30c
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment