On Thu, 21 Aug 2025, Andrew Pinski wrote: > The middle-end does not fully understand NULLPTR_TYPE. So it > gets confused a lot of the time when dealing with it. > This adds the folding that is similarly done in the C++ front-end already. > In some cases it should produce slightly better code as there is no > reason to load from a nullptr_t variable as it is always NULL. > > The following is handled: > nullptr_v ==/!= nullptr_v -> true/false > (ptr)nullptr_v -> (ptr)0, nullptr_v > f(nullptr_v) -> f ((nullptr, nullptr_v)) > > The last one is for conversion inside ... . > > Bootstrapped and tested on x86_64-linux-gnu.
OK. -- Joseph S. Myers josmy...@redhat.com