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


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


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