This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] proposed fix for PR40987 if-conversion bug on HWI32 hosts


Eric Botcazou writes:
 > > This proposed fix compares GET_MODE_BITSIZE of the mode of the
 > > destination variable with HOST_BITS_PER_WIDE_INT to see if
 > > compile-time arithmetic may be inadequate, and in that case
 > > performs an early failure return from the function.
 > 
 > Won't this disable the transformation for 'long long' variables but small 
 > constants as well?

Yes, unfortunately it will do that.

 >  If so, can this be avoided by using host_integerp at the 
 > appropriate places instead?

I do suspect that some optimizations can be salvaged. To do
that someone has to go through every single computation, test,
and code-generation sequence (and there are quite a few) and
review them for the "sizeof(dst) > sizeof(hwi)" case, and
either keep them as-is if they're safe, or disable them with
additional checks if they're unsafe.

I can try to do this.

/Mikael


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]