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]

Re: S/390: Fix minor missed optimization


Richard Henderson wrote:

>Better to compare against the arg_pointer_rtx directly.

Right.  I've committed the following patch to fix this.

Thanks,
Ulrich



      * config/s390/s390.c (s390_decompose_address): Use arg_pointer_rtx
      for comparison.

Index: gcc/config/s390/s390.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/config/s390/s390.c,v
retrieving revision 1.66
diff -c -p -r1.66 s390.c
*** gcc/config/s390/s390.c    25 Oct 2002 12:26:40 -0000    1.66
--- gcc/config/s390/s390.c    4 Nov 2002 13:24:20 -0000
*************** s390_decompose_address (addr, out)
*** 1605,1616 ****
           Thus we don't check the displacement for validity here.  If after
           elimination the displacement turns out to be invalid after all,
           this is fixed up by reload in any case.  */
!       if ((base && REGNO (base) == ARG_POINTER_REGNUM)
!           || (indx && REGNO (indx) == ARG_POINTER_REGNUM))
!         ;
!
!       else if (INTVAL (disp) < 0 || INTVAL (disp) >= 4096)
!         return FALSE;
          }

        /* In the small-PIC case, the linker converts @GOT12
--- 1605,1615 ----
           Thus we don't check the displacement for validity here.  If after
           elimination the displacement turns out to be invalid after all,
           this is fixed up by reload in any case.  */
!       if (base != arg_pointer_rtx && indx != arg_pointer_rtx)
!         {
!           if (INTVAL (disp) < 0 || INTVAL (disp) >= 4096)
!             return FALSE;
!         }
          }

        /* In the small-PIC case, the linker converts @GOT12




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