On Fri, Apr 05, 2013 at 09:21:16AM +0200, Richard Biener wrote: > Jakub Jelinek <ja...@redhat.com> wrote: > > >On Thu, Apr 04, 2013 at 08:37:47PM +0200, Richard Biener wrote: > >> Can you factor out a function that returns > >> A proper qimode value if possible or null and > >> Use it in both places? > > > >Like this? > > You should be able to remove zero, minus one and constructor special > casing, no? Ok, maybe not constructor handling, but at least move
No, because the function is only handling BITS_PER_UNIT == 8 && CHAR_BIT == 8, plus is unnecessarily expensive for the common case of storing 0. But if you want, I can move all that integer_zerop / real_zerop / CONSTRUCTOR / integer_all_onesp handling into the function. BTW, the integer_all_onesp stuff is broken for this from what I can see, for complex numbers it returns true for -1 + 0i where all bytes aren't 0xff, so we need to rule out COMPLEX_CSTs (or do integer_all_onesp on each part instead). And TYPE_PRECISION on VECTOR_CSTs won't be what we are looking for. Jakub