This is the mail archive of the
mailing list for the GCC project.
Re: [committed] clarify sleu_operand
- From: Richard Sandiford <rsandifo at nildram dot co dot uk>
- To: Eric Christopher <echristo at redhat dot com>
- Cc: gcc-patches at gcc dot gnu dot org
- Date: Tue, 07 Jun 2005 22:05:16 +0100
- Subject: Re: [committed] clarify sleu_operand
- References: <firstname.lastname@example.org>
Eric Christopher <email@example.com> writes:
> (define_predicate "sleu_operand"
> - (and (match_operand 0 "sle_operand")
> - (match_test "INTVAL (op) + 1 != 0")))
> + (and (match_code "const_int")
> + (match_test "IN_RANGE ((INTVAL (op) + 1), 0, 32767)")))
Um, this doesn't do the same thing at all. Please revert.
The point of the original is to exclude comparisons against ~0U,
which can't be done, because we implement X <= C as X < (C + 1).
That obviously isn't the same thing when C + 1 carries. Your patch
now _allows_ comparisons against ~0U, and so from that point of view,
it's a correctness regression.
On the other hand, comparisons against ~2U are fine, and aren't
allowed after your change. From that point of view it's a
performance regression too.