This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: SIMPLE NOT expressions
- From: Steven Bosscher <s dot bosscher at student dot tudelft dot nl>
- To: Daniel Berlin <dberlin at dberlin dot org>
- Cc: Paul Brook <paul at nowt dot org>, Diego Novillo <dnovillo at redhat dot com>,gcc at gcc dot gnu dot org
- Date: 18 Jul 2002 22:45:48 +0200
- Subject: Re: SIMPLE NOT expressions
- References: <Pine.LNX.4.44.0207181635040.24156-100000@dberlin.org>
Op do 18-07-2002, om 22:36 schreef Daniel Berlin:
> But anyway, why should is_simple_unary_expr return true for a
> TRUTH_NOT_EXPR.
Hmmm, you're right, it should not. The truth NOT operator is not part of
the SIMPLE grammar.
> They should all be converted into EQ_EXPR's.
> case TRUTH_NOT_EXPR:
> tmp = TREE_OPERAND (*expr_p, 0);
> simplify_expr (&tmp, pre_p, post_p, is_simple_id, fb_rvalue);
> *expr_p = build (EQ_EXPR, TREE_TYPE (*expr_p), tmp,
> integer_zero_node);
> break;
>
> This code should always replace a TRUTH_NOT_EXPR with an EQ_EXPR.
>
> So why do you still end up with them?
My mistake. Before I wrote this code, I looked at tree-simple.c:
unop
: '+'
| '-'
| '!'
| '~'
But these are bitwise unops, so we're actually generating non-SIMPLE
code. Oops!
I'll fix it, thanks!
Greetz
Steven