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: Geoff Keating <geoffk at redhat dot com>
- Subject: Re: patch: subreg of mem when converting vector types
- From: Aldy Hernandez <aldyh at redhat dot com>
- Date: 02 Nov 2001 16:50:46 -0500
- Cc: gcc-patches at gcc dot gnu dot org
- References: <1004575206.30169.222.camel@litecycle.cc.andrews.edu><jmpu73p57p.fsf@geoffk.org>
>>>>> "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?
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;