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]

S/390: Fix gcse-after-reload problems with doloop


Hello,

this fixes a problem exposed by the new GCSE-after-reload pass: if a doloop
pattern needs a reload, operand 2 may turn out to become a MEM.  This is
later split into different patterns, but in between reload and splitting,
we have a pattern that is not recognizable.

Bootstrapped/regtested on s390-ibm-linux and s390x-ibm-linux, 
fixes several test cases.  Applied to mainline.

Bye,
Ulrich

ChangeLog:

	* config/s390/s390.md ("*doloop_si"): Change predicate for operand 2
	to nonimmediate_operand.
	("*doloop_di"): Likewise.


Index: gcc/config/s390/s390.md
===================================================================
RCS file: /cvs/gcc/gcc/gcc/config/s390/s390.md,v
retrieving revision 1.105
diff -c -p -r1.105 s390.md
*** gcc/config/s390/s390.md	21 Mar 2004 20:03:10 -0000	1.105
--- gcc/config/s390/s390.md	21 Mar 2004 23:07:20 -0000
***************
*** 6691,6697 ****
                (const_int 1))
            (label_ref (match_operand 0 "" ""))
            (pc)))
!    (set (match_operand:SI 2 "register_operand" "=1,?*m*d")
          (plus:SI (match_dup 1) (const_int -1)))
     (clobber (match_scratch:SI 3 "=X,&d"))
     (clobber (reg:CC 33))]
--- 6691,6697 ----
                (const_int 1))
            (label_ref (match_operand 0 "" ""))
            (pc)))
!    (set (match_operand:SI 2 "nonimmediate_operand" "=1,?*m*d")
          (plus:SI (match_dup 1) (const_int -1)))
     (clobber (match_scratch:SI 3 "=X,&d"))
     (clobber (reg:CC 33))]
***************
*** 6771,6777 ****
                (const_int 1))
            (label_ref (match_operand 0 "" ""))
            (pc)))
!    (set (match_operand:DI 2 "register_operand" "=1,?*m*r")
          (plus:DI (match_dup 1) (const_int -1)))
     (clobber (match_scratch:DI 3 "=X,&d"))
     (clobber (reg:CC 33))]
--- 6771,6777 ----
                (const_int 1))
            (label_ref (match_operand 0 "" ""))
            (pc)))
!    (set (match_operand:DI 2 "nonimmediate_operand" "=1,?*m*r")
          (plus:DI (match_dup 1) (const_int -1)))
     (clobber (match_scratch:DI 3 "=X,&d"))
     (clobber (reg:CC 33))]
-- 
  Dr. Ulrich Weigand
  weigand@informatik.uni-erlangen.de


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