This is the mail archive of the
mailing list for the GCC project.
Re: PATCH: add new transformations in cse
- From: Geert Bosch <bosch at gnat dot com>
- To: Dale Johannesen <dalej at apple dot com>
- Cc: gcc-patches at gcc dot gnu dot org
- Date: Tue, 18 Dec 2001 19:44:36 -0500
- Subject: Re: PATCH: add new transformations in cse
On Tuesday, December 18, 2001, at 05:36 , Dale Johannesen wrote:
> + case PLUS:
> + /* If we have (PLUS X Y), see if X is known to be (NEG Z).
> + If so, this simplifies to (MINUS Y Z). */
Forgive me if this code only deals with unsigned types and my comment is
way off, but for signed types I don't think this holds. If Z==-32768,
then NEG Z would be zero and the operation yields (PLUS 0 Y), but with
simplification it would ield (MINUS Y -32768). Maybe an extra comment
the kind of values this handles would be nice, since I can't easily
this from the context in cse.c.