[committed] Fix PR optimization/12630

John David Anglin dave@hiauly1.hia.nrc.ca
Fri Oct 17 03:56:00 GMT 2003


The following patch from Jan Hubicka resolves reload problems with
the movstrsi_internal pattern.

Tested on hppa-unknown-linux-gnu and hppa2.0w-hp-hpux11.11.  Installed
to trunk.

Dave
-- 
J. David Anglin                                  dave.anglin@nrc-cnrc.gc.ca
National Research Council of Canada              (613) 990-0752 (FAX: 952-6602)

2003-10-16  Jan Hubicka  <jh@suse.cz>

	PR optimization/12630
	* pa.md (movstrsi, movstrsi_internal): Use match_scratch in clobbers
	for operands 7 and 8.

Index: pa.md
===================================================================
RCS file: /cvs/gcc/gcc/gcc/config/pa/pa.md,v
retrieving revision 1.131
diff -u -3 -p -r1.131 pa.md
--- pa.md	24 Sep 2003 01:38:32 -0000	1.131
+++ pa.md	16 Oct 2003 21:08:22 -0000
@@ -2945,8 +2945,8 @@
 (define_expand "movstrsi"
   [(parallel [(set (match_operand:BLK 0 "" "")
 		   (match_operand:BLK 1 "" ""))
-	      (clobber (match_dup 7))
-	      (clobber (match_dup 8))
+	      (clobber (match_scratch:SI 7 ""))
+	      (clobber (match_scratch:SI 8 ""))
 	      (clobber (match_dup 4))
 	      (clobber (match_dup 5))
 	      (clobber (match_dup 6))
@@ -3016,10 +3016,10 @@
 ;; therefore it is forced to operand 2.  If the count is compile-time
 ;; determined, we need two scratch registers for the unrolled code.
 (define_insn "movstrsi_internal"
-  [(set (mem:BLK (match_operand:SI 0 "register_operand" "+r,r"))
-	(mem:BLK (match_operand:SI 1 "register_operand" "+r,r")))
-   (clobber (match_dup 0))
-   (clobber (match_dup 1))
+  [(set (mem:BLK (match_operand:SI 0 "register_operand" "r,r"))
+	(mem:BLK (match_operand:SI 1 "register_operand" "r,r")))
+   (clobber (match_scratch:SI 7 "=0,0"))
+   (clobber (match_scratch:SI 8 "=1,1"))
    (clobber (match_operand:SI 2 "register_operand" "=r,r"))	;loop cnt/tmp
    (clobber (match_operand:SI 3 "register_operand" "=&r,&r"))	;item tmp
    (clobber (match_operand:SI 6 "register_operand" "=&r,&r"))	;item tmp2



More information about the Gcc-patches mailing list