On Oct 19, 2013, at 7:18 AM, Richard Sandiford <rdsandif...@googlemail.com> 
wrote:
> So I think Mike's original patch was right and that this extra
> "y.len == 1" check is redundant.

So, gcc's optimizer agrees with your view, it is redundant.  :-)

I checked this in:

Index: wide-int.h
===================================================================
--- wide-int.h  (revision 203860)
+++ wide-int.h  (working copy)
@@ -1464,11 +1464,7 @@ inline bool
 wi::lts_p (const wide_int_ref &x, const wide_int_ref &y)
 {
   // We optimize x < y, where y is 64 or fewer bits.
-  // We have to be careful to not allow comparison to a large positive
-  // unsigned value like 0x8000000000000000, those would be encoded
-  // with a y.len == 2.
-  if (y.precision <= HOST_BITS_PER_WIDE_INT
-      && y.len == 1)
+  if (y.precision <= HOST_BITS_PER_WIDE_INT)
     {
       // If x fits directly into a shwi, we can compare directly.
       if (wi::fits_shwi_p (x))

Reply via email to