Re: [PATCH 0/4] Replace nonzero_p with contains_zero_p
Richard Biener <[email protected]> Thu, 6 Aug 2026 10:28:29 +0200 (CEST)
| Newsgroups | gmane.comp.gcc.patches |
|---|---|
| Message-ID | <[email protected]> |
On Wed, 5 Aug 2026, Aldy Hernandez wrote: > On Wed, Aug 05, 2026 at 04:17:19PM +0200, Aldy Hernandez wrote: > > Per our discussion, nonzero_p() has always been a bit insane. It only > > returns true for ~[0,0] so even [13,13] is considered false. > > Introduce contains_zero_p(), which from the looks of it, we've already > > been hand crafting, as direct nonzero_p() calls were few. > > > > How does this look? > > BTW, I ran my usual LAPACK source files through each patch > independently, and there are no changes to assembly, so in theory this > whole set is surprisingly a non-functional change. You also add contains_zero_p for frange, but what does this actually mean there? irange already had contains_zero_p. I suppose we can document contains_zero_p to mean that for a value with the range val == T(0) may evaluate true? So for frange this means either -0.0 or 0.0? irange implements it in terms of contains_p which is already there for frange and that implements it as >= && <=. So I think it's all sound. OK from my side. Thanks, Richard.