This is the mail archive of the
mailing list for the GCC project.
Re: Properly handle VIEW_CONVERT_EXPR in LHS (fixes 4.5 ACATS tests)
- From: Richard Henderson <rth at redhat dot com>
- To: Richard Kenner <kenner at vlsi1 dot ultra dot nyu dot edu>
- Cc: gcc-patches at gcc dot gnu dot org
- Date: Mon, 29 Nov 2004 18:37:53 -0800
- Subject: Re: Properly handle VIEW_CONVERT_EXPR in LHS (fixes 4.5 ACATS tests)
- References: <10411300210.AA03268@vlsi1.ultra.nyu.edu>
On Mon, Nov 29, 2004 at 09:10:02PM -0500, Richard Kenner wrote:
> const_val must satisfy is_gimple_min_invariant, because it is
> substituted into PHI nodes. In some cases, you may be able to
> construct a correct replacement, but in others it'll be tricky.
> I suggest
> w = fold (build1 (VIEW_CONVERT_EXPR, ...))
> if (is_gimple_min_invariant (w))
> Well, fold doesn't do anything for VIEW_CONVERT_EXPR now unless the input
> is also a VIEW_CONVERT_EXPR, which it isn't. So that condition will
> never be true.
The point being, that *if* you were going to be adding any code to
view convert one constant into another constant, fold would be the
place to do it.
> I thought these substitutions were for other statements, not PHI nodes?
They are for both.
> If indeed it must be a constant, then what do we record in that case,
VARYING. We know what the value is, and it isn't CONSTANT.