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]

kill redudnant code in gen_realpart and gen_imagpart



Hi,
this patch makes gen_realpart and gen_imagpart to use gen_lowpart/gen_highpart
unconditionally, as these should be able to handle CONCATs now.

Honza

Thu May 24 15:52:31 CEST 2001  Jan Hubicka  <jh@suse.cz>
	* emit-rtl.c (gen_realpart, gen_imagpart): Do not handle
	CONCAT specially.

Index: emit-rtl.c
===================================================================
RCS file: /cvs/gcc/egcs/gcc/emit-rtl.c,v
retrieving revision 1.177
diff -c -3 -p -r1.177 emit-rtl.c
*** emit-rtl.c	2001/05/22 06:29:39	1.177
--- emit-rtl.c	2001/05/24 13:51:10
*************** gen_realpart (mode, x)
*** 1088,1099 ****
       enum machine_mode mode;
       register rtx x;
  {
!   if (GET_CODE (x) == CONCAT && GET_MODE (XEXP (x, 0)) == mode)
!     return XEXP (x, 0);
!   else if (WORDS_BIG_ENDIAN
! 	   && GET_MODE_BITSIZE (mode) < BITS_PER_WORD
! 	   && REG_P (x)
! 	   && REGNO (x) < FIRST_PSEUDO_REGISTER)
      internal_error
        ("Can't access real part of complex value in hard register");
    else if (WORDS_BIG_ENDIAN)
--- 1016,1025 ----
       enum machine_mode mode;
       register rtx x;
  {
!   if (WORDS_BIG_ENDIAN
!       && GET_MODE_BITSIZE (mode) < BITS_PER_WORD
!       && REG_P (x)
!       && REGNO (x) < FIRST_PSEUDO_REGISTER)
      internal_error
        ("Can't access real part of complex value in hard register");
    else if (WORDS_BIG_ENDIAN)
*************** gen_imagpart (mode, x)
*** 1110,1118 ****
       enum machine_mode mode;
       register rtx x;
  {
!   if (GET_CODE (x) == CONCAT && GET_MODE (XEXP (x, 0)) == mode)
!     return XEXP (x, 1);
!   else if (WORDS_BIG_ENDIAN)
      return gen_lowpart (mode, x);
    else if (! WORDS_BIG_ENDIAN
  	   && GET_MODE_BITSIZE (mode) < BITS_PER_WORD
--- 1036,1042 ----
       enum machine_mode mode;
       register rtx x;
  {
!   if (WORDS_BIG_ENDIAN)
      return gen_lowpart (mode, x);
    else if (! WORDS_BIG_ENDIAN
  	   && GET_MODE_BITSIZE (mode) < BITS_PER_WORD


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