This is the mail archive of the
mailing list for the GCC project.
Re: Unreviewed patch (expand_expr:MINUS_EXPR)
- From: Geoff Keating <geoffk at geoffk dot org>
- To: "Ulrich Weigand" <Ulrich dot Weigand at de dot ibm dot com>
- Cc: jason at redhat dot com, gcc-patches at gcc dot gnu dot org
- Date: 16 Sep 2002 17:06:35 -0700
- Subject: Re: Unreviewed patch (expand_expr:MINUS_EXPR)
- References: <OF8FFE2FB3.329A18C8-ONC1256C2F.005CDA97@de.ibm.com>
"Ulrich Weigand" <Ulrich.Weigand@de.ibm.com> writes:
> Could someone please have a look at this patch:
[that refers to an original patch by Jason:]
I think it'd be better to fix Jason's original patch; there's no reason
why this can't be done at the tree level.
I was looking at the original explanation for Jason's patch,
and have come to two conclusions:
1. It would really have helped if there were more testcases. Jason,
do you remember what specifically broke? Ulrich, can you make up a
testcase for the optimisation you're missing (perhaps using
2. I don't understand Jason's original patch. If you negate something
in a POINTER_TYPE, it should be what you'd expect: the value which,
when added to another POINTER_TYPE value, is equivalent to
subtracting the original thing. If that doesn't happen then negation
I think this might be something which was really fixed later by the
application of stricter rules about the sign-extension of CONST_INTs,
and so the right thing is to just back out Jason's original patch
(with some minor changes, signed_type is now a language hook).
Any other opinions?
- Geoffrey Keating <firstname.lastname@example.org>