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]
Other format: [Raw text]

fix middle-end/10557


The check here is over-conservative.  It doesn't work with
xmode == XFmode, whereas subreg_offset demonstrably does.


r~


        * rtlanal.c (subreg_offset_representable_p): Relax subreg check.

Index: rtlanal.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/rtlanal.c,v
retrieving revision 1.157
diff -c -p -d -r1.157 rtlanal.c
*** rtlanal.c	20 May 2003 01:49:12 -0000	1.157
--- rtlanal.c	13 Jun 2003 05:27:20 -0000
*************** subreg_offset_representable_p (xregno, x
*** 3427,3442 ****
  
  #ifdef ENABLE_CHECKING
    /* This should always pass, otherwise we don't know how to verify the
!      constraint. 
! 
!      These conditions may be relaxed but subreg_offset would need to be
!      redesigned.  */
    if (GET_MODE_SIZE (xmode) % GET_MODE_SIZE (ymode)
        || GET_MODE_SIZE (ymode) % nregs_ymode
-       || (GET_MODE_BITSIZE (mode_for_size (GET_MODE_BITSIZE (xmode)
- 			      		   / nregs_xmode,
- 					   MODE_INT, 0))
- 	  != GET_MODE_BITSIZE (xmode) / nregs_xmode)
        || nregs_xmode % nregs_ymode)
      abort ();
  #endif
--- 3427,3436 ----
  
  #ifdef ENABLE_CHECKING
    /* This should always pass, otherwise we don't know how to verify the
!      constraint.  These conditions may be relaxed but subreg_offset would
!      need to be redesigned.  */
    if (GET_MODE_SIZE (xmode) % GET_MODE_SIZE (ymode)
        || GET_MODE_SIZE (ymode) % nregs_ymode
        || nregs_xmode % nregs_ymode)
      abort ();
  #endif


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