This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: patch: subreg of mem when converting vector types
- To: aldyh at redhat dot com
- Subject: Re: patch: subreg of mem when converting vector types
- From: Geoff Keating <geoffk at geoffk dot org>
- Date: Fri, 2 Nov 2001 14:01:55 -0800
- CC: gcc-patches at gcc dot gnu dot org
- References: <1004575206.30169.222.camel@litecycle.cc.andrews.edu><jmpu73p57p.fsf@geoffk.org> <m3pu70yh8p.fsf@litecycle.cc.andrews.edu>
- Reply-to: Geoff Keating <geoffk at redhat dot com>
> Cc: gcc-patches@gcc.gnu.org
> From: Aldy Hernandez <aldyh@redhat.com>
> Date: 02 Nov 2001 16:50:46 -0500
> User-Agent: Gnus/5.0808 (Gnus v5.8.8) Emacs/20.7
>
> >>>>> "Geoff" == Geoff Keating <geoffk@geoffk.org> writes:
>
> > Wouldn't it create more efficient code if instead simplify_subreg was
> > always called afterwards? It would save a (perhaps unnecessary) copy
> > to a register.
>
> Alright, alright, alright... Sure enough, shorter and sweeter.
>
> No regressions.
>
> Ok to install?
OK.
> 2001-11-02 Aldy Hernandez <aldyh@redhat.com>
>
> * expr.c (convert_move): Use simplify_gen_subreg to make SUBREG so
> we avoid SUBREGing memory.
>
> Index: expr.c
> ===================================================================
> RCS file: /cvs/uberbaum/gcc/expr.c,v
> retrieving revision 1.369
> diff -c -r1.369 expr.c
> *** expr.c 2001/10/30 12:41:42 1.369
> --- expr.c 2001/11/02 21:44:49
> ***************
> *** 544,552 ****
> abort ();
>
> if (VECTOR_MODE_P (to_mode))
> ! from = gen_rtx_SUBREG (to_mode, from, 0);
> else
> ! to = gen_rtx_SUBREG (from_mode, to, 0);
>
> emit_move_insn (to, from);
> return;
> --- 544,552 ----
> abort ();
>
> if (VECTOR_MODE_P (to_mode))
> ! from = simplify_gen_subreg (to_mode, from, GET_MODE (from), 0);
> else
> ! to = simplify_gen_subreg (from_mode, to, GET_MODE (to), 0);
>
> emit_move_insn (to, from);
> return;
>
--
- Geoffrey Keating <geoffk@geoffk.org> <geoffk@redhat.com>