This is the mail archive of the gcc@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]

Re: associative law in combine


> 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.


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