This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: associative law in combine
- To: toon at moene dot indiv dot nluug dot nl (Toon Moene)
- Subject: Re: associative law in combine
- From: Joern Rennecke <amylaar at redhat dot com>
- Date: Wed, 18 Jul 2001 19:30:12 +0100 (BST)
- Cc: amylaar at redhat dot com (Joern Rennecke), jh at suse dot cz (Jan Hubicka),gcc at gcc dot gnu dot org
> issue in my reply to you. Because overflow can only be determined at
> compile time with constants, this conversion cannot be right for
> variables.
Actually, as with most rules, there is an exception here: if b and c
are widened, or are constants that fit into a type with less precision,
we can widen before the multiply, or, even better, we can use a wideining
multiply (if available).
e.g.:
long long a;
int b, c;
or:
double a;
float b, c;
or:
double a;
float b;
a = a / b / 42
However, that might be to rare to be worth the effort.