This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: Handle fabs(x) UNGE 0.0
- From: Geoffrey Keating <geoffk at apple dot com>
- To: Roger Sayle <roger at www dot eyesopen dot com>
- Cc: gcc-patches at gcc dot gnu dot org
- Date: Mon, 5 May 2003 11:25:02 -0700
- Subject: Re: Handle fabs(x) UNGE 0.0
On Sunday, May 4, 2003, at 05:56 AM, Roger Sayle wrote:
...
A related unreviewed patch (that correctly uses const_true_rtx now
that I'm older, wiser and more more fluent in GCC's incantations) is:
http://gcc.gnu.org/ml/gcc-patches/2003-04/msg01757.html
This patch has the nice habit of defensively fixing const1_rtx into
const_true_rtx in many of the RTL optimizers.
What happens if you write this instead as
if (x == const0_rtx)
return const0_rtx;
else
abort();
?
I don't think it makes sense to be forcing non-zero values into CCmode,
and if it is possible then it's certainly machine-specific as to what
it might mean. Note that CCmode values are *not* single bits, that's
BImode; the only way you can have a CCmode constant is in an expression
like
(eq (reg:CC 123) (const_int 0))
which really means 'test the EQ bit of register 123'; no comparison is
involved.
--
Geoff Keating <geoffk@apple.com>