This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: Patch to combine for simplify_comparision()
- To: law at cygnus dot com
- Subject: Re: Patch to combine for simplify_comparision()
- From: Nick Clifton <nickc at cygnus dot com>
- Date: Thu, 23 Sep 1999 16:05:13 +0100
- CC: gcc-patches at gcc dot gnu dot org
Hi Jeff,
: > Thu Sep 23 11:42:11 1999 Nick Clifton <nickc@cygnus.com>
: >
: > * combine.c (simplify_comparison): Use an unsigned shift to adjust
: > the constant.
: This is fine with a couple trivial changes.
:
: First, a short comment about the need to use unsigned arithmetic would be
: wise. Second s/foo/temp/, or something similar. As a variable name "foo"
: leaves a lot to be desired.
Done.
: The testcase needs a change too -- remember we have targets where
: ints are 16 bits :-) If you do not want to generalize the test to those
: targets, then you should add something like
:
: if (sizeof (int) != 4)
: exit 0
:
: To the test to prevent it from barfing on our targets with 16bit ints.
I have changed all the use of 'short' and 'int' to 'long' and added an
L suffix to the constants. This should suffice I hope. (I also
retested the test and it does still fail without the patch applied and
pass with the patch applied).
Cheers
Nick