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: [wide-int] int_traits <tree>


Mike Stump <mikestump@comcast.net> writes:
> +  // 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)

I don't get this.  If y.precision <= HOST_BITS_PER_WIDE_INT then
y.len must be 1.  I realise that tree constants can be stored with
TREE_INT_CST_NUNITS > TYPE_PRECISION / HOST_BITS_PER_WIDE_INT
(so that extensions beyond TYPE_PRECISION are free).  But the
wide-int code is shielded from that by the ::decompose routine.
A wide int never has len > precision / HOST_BITS_PER_WIDE_INT.

Thanks,
Richard


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