[PATCH] New predicate covering NOP_EXPR and CONVERT_EXPR
Richard Guenther
richard.guenther@gmail.com
Fri Dec 2 18:03:00 GMT 2005
On 12/2/05, Richard Kenner <kenner@vlsi1.ultra.nyu.edu> wrote:
> So you agree to something along
>
> --- 2789,2796 ----
> /* If the input is a biased type, adjust first. */
> if (ecode == INTEGER_TYPE && TYPE_BIASED_REPRESENTATION_P (etype))
> return convert (type, fold (build2 (PLUS_EXPR, TREE_TYPE (etype),
> ! fold_convert (TREE_TYPE (etype),
> ! expr),
> TYPE_MIN_VALUE (etype))));
>
> fold_convert is the one that does *not* call the front-end convert routine,
> right? If so, yes, that looks right. (Of course it should be tested,
> but I'm not sure there's a test case for it in ACATS.)
Right, fold_convert is merely a shortcut for fold_build1 (NOP_EXPR,...), so
if we agree that CONVERT_EXPR == NOP_EXPR (which should be better true
at this point if you call fold () on it), then it is a 1:1 change
avoiding choosing
NOP_EXPR or CONVERT_EXPR here. So it will ease whatever transition we will
do.
So I guess, even testing should not be necessary, but I can give it a shot.
Richard.
More information about the Gcc-patches
mailing list