This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: patch: subreg of mem when converting vector types


> 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>


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]