This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: Fix cprop_hardregs handling of SSE logical on fp patterns
- From: Richard Henderson <rth at redhat dot com>
- To: Jan Hubicka <jh at suse dot cz>
- Cc: gcc-patches at gcc dot gnu dot org, aj at suse dot de, patches at x86-64 dot org
- Date: Tue, 12 Feb 2002 14:28:53 -0800
- Subject: Re: Fix cprop_hardregs handling of SSE logical on fp patterns
- References: <20020212162459.GA14553@atrey.karlin.mff.cuni.cz>
On Tue, Feb 12, 2002 at 05:24:59PM +0100, Jan Hubicka wrote:
> + if (GET_CODE (x) == SUBREG)
> + x = simplify_subreg (GET_MODE (x), SUBREG_REG (x),
> + GET_MODE (SUBREG_REG (x)), SUBREG_BYTE (x));
I wonder if it would be better to just do
if (GET_CODE (x) == SUBREG)
{
/* SUBREGS are supposed to have been eliminated by now. But some
ports, e.g. i386 sse, use them to smuggle vector type information
through to instruction selection. So allow mode frobbing that
changes type, but doesn't change size. */
if (!subreg_lowpart_p (x)
|| (GET_MODE_SIZE (GET_MODE (x))
!= GET_MODE_SIZE (GET_MODE (SUBREG_REG (x)))))
abort ();
x = SUBREG_REG (x);
}
Eh. I guess either works. If it's now a very simple subreg
we'll get NULL back, which will promptly crash. I suppose you
could add some commentary saying what sorts of things we
expect here, and if it doesn't simplify you've done something
wrong.
r~