Re: [PATCH] c: Add folding of nullptr_t in some cases [PR121478]

2025-08-21 Thread Joseph Myers
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 th

[PATCH] c: Add folding of nullptr_t in some cases [PR121478]

2025-08-21 Thread Andrew Pinski
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