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: Bad choices by expand_mult_highpart


I wrote:

> In fact, your point as to neg_variant is well taken -- it looks
> as if the second strategy could indeed give incorrect results
> if neg_variant is chosen ...  I'll see if I can find a test case.

OK, there's no problem after all.  In fact, whether or not
choose_mult_variant uses the negate_variant makes no different
whatsoever on the result *as seen in the mode passed to
choose_mult_variant*.  Since we now pass wider_mode to
choose_mult_variant, our highpart result is exactly the
same in both cases.

This applies to any bit-pattern used as constant, so no matter
whether or not we truncate and/or extend the INTVAL, this same
equivalency holds.

Bye,
Ulrich

-- 
  Dr. Ulrich Weigand
  weigand@informatik.uni-erlangen.de


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