Fix xstormy16's eqbranchsi pattern

Nick Clifton nickc@redhat.com
Wed Feb 6 10:36:00 GMT 2008


Hi Guys,

  The xstormy16 port's eqbranchsi pattern has had problems because it
  was using a match_dup inside a clobber and frequently an
  optimization would change the register that was being duplicated
  without changing the match_dup.  So I am applying the patch below in
  order to fix this in the same way that the problem was fixed for the
  ineqbranchsi pattern.

Cheers
  Nick

gcc/ChangeLog
2008-02-06  Nick Clifton  <nickc@redhat.com>

	* config/stormy16/stormy16.md (eqbranchsi): Replace a match_dup
	inside the clobber with a match_operand and duplicated operand
	number in the constraint.
	(ineqbranchsi): Delete redundant comment.

Index: gcc/config/stormy16/stormy16.md
===================================================================
--- gcc/config/stormy16/stormy16.md	(revision 132112)
+++ gcc/config/stormy16/stormy16.md	(working copy)
@@ -880,11 +880,7 @@
 				       (const_int 0)])
 		      (label_ref (match_operand 0 "" ""))
 		      (pc)))
-;; Although I would greatly like the 'match_dup' in the following line
-;; to actually be a register constraint, there is (at the time of writing) no
-;; way for reload to insert an output reload on the edges out of a branch.
-;; If reload is fixed to use insert_insn_on_edge, this can be changed.
-   (clobber (match_dup 2))]
+   (clobber (match_operand:SI 3 "register_operand" "=2"))]
   ""
   "*
 {
@@ -902,10 +898,6 @@
 							 "ri")])
 		      (label_ref (match_operand 0 "" ""))
 		      (pc)))
-   ;; This clobber is problematic.  Too many gcc optimizations will change
-   ;; operand 2 without changing the clobber.  At the time of writing there
-   ;; is no way around this. :-(  For an example try compiling:
-   ;; gcc.c-torture/compile/20000403-1.c -O3 -fomit-frame-pointer -funroll-loops
    (clobber (match_operand:SI 5 "register_operand" "=2"))
    (clobber (match_operand:BI 4 "" "=&y"))]
   ""



More information about the Gcc-patches mailing list