This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: Bad choices by expand_mult_highpart
- From: Ulrich Weigand <weigand at i1 dot informatik dot uni-erlangen dot de>
- To: weigand at i1 dot informatik dot uni-erlangen dot de (Ulrich Weigand)
- Cc: rsandifo at redhat dot com (Richard Sandiford), weigand at i1 dot informatik dot uni-erlangen dot de (Ulrich Weigand), roger at eyesopen dot com (Roger Sayle), ja2morri at csclub dot uwaterloo dot ca (James Morrison), gcc-patches at gcc dot gnu dot org
- Date: Mon, 22 Mar 2004 23:38:54 +0100 (CET)
- Subject: 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