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]

Committed: Remove bogus alternative from RX's sminsi3 pattern


Hi Guys,

  The sminsi3 pattern in the rx.md file has a bogus alternative where it
  tries to provide for computing "A = min (B, C)", without allowing for
  the fact that gcc might be computing "A = min (B, A)".  The
  alternative is bogus anyway.  GCC is perfectly capable of rearranging
  register assignments to cope with a sminsi3 pattern that always
  requires operand1 to be the same as operand0.

  So I am applying the patch below to remove the alternative altogether.

Cheers
  Nick

gcc/ChangeLog
2010-02-26  Nick Clifton  <nickc@redhat.com>

	* config/rx/rx.md (sminsi3): Remove bogus alternative.

Index: gcc/config/rx/rx.md
===================================================================
--- gcc/config/rx/rx.md	(revision 157082)
+++ gcc/config/rx/rx.md	(working copy)
@@ -845,10 +845,10 @@
 )
 
 (define_insn "sminsi3"
-  [(set (match_operand:SI          0 "register_operand" "=r,r,r,r,r,r,r")
-	(smin:SI (match_operand:SI 1 "register_operand" "%0,0,0,0,0,0,r")
+  [(set (match_operand:SI          0 "register_operand" "=r,r,r,r,r,r")
+	(smin:SI (match_operand:SI 1 "register_operand" "%0,0,0,0,0,0")
 		 (match_operand:SI 2 "rx_source_operand"
-				   "r,Sint08,Sint16,Sint24,i,Q,r")))]
+				   "r,Sint08,Sint16,Sint24,i,Q")))]
   ""
   "@
   min\t%Q2, %0
@@ -856,10 +856,9 @@
   min\t%Q2, %0
   min\t%Q2, %0
   min\t%Q2, %0
-  min\t%Q2, %0
-  mov.l\t%1,%0\n\tmin\t%Q2, %0"
-  [(set_attr "length"  "3,4,5,6,7,6,5")
-   (set_attr "timings" "11,11,11,11,11,33,22")]
+  min\t%Q2, %0"
+  [(set_attr "length"  "3,4,5,6,7,6")
+   (set_attr "timings" "11,11,11,11,11,33")]
 )
 
 (define_insn "mulsi3"


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