re PR target/18331 (mmix-knuth-mmixware testsuite failure: execute/ieee/fp-cmp-8...
authorHans-Peter Nilsson <hp@bitrange.com>
Sun, 28 Nov 2004 09:48:27 +0000 (09:48 +0000)
committerHans-Peter Nilsson <hp@gcc.gnu.org>
Sun, 28 Nov 2004 09:48:27 +0000 (09:48 +0000)
PR target/18331
* config/mmix/mmix.md ("*movdicc_real_reversible"): Rename from
"*movdicc_real".  Only match reversible comparisons.
("*movdicc_real_nonreversible"): New pattern, split from
"*movdicc_real".  Match only nonreversible comparisons.  Exclude
reversed alternatives.
("*movdfcc_real_reversible", "*movdfcc_real_nonreversible"):
Similar.

From-SVN: r91416

gcc/ChangeLog
gcc/config/mmix/mmix.md

index 3984aaa..b9a65f6 100644 (file)
@@ -1,3 +1,14 @@
+2004-11-28  Hans-Peter Nilsson  <hp@bitrange.com>
+
+       PR target/18331
+       * config/mmix/mmix.md ("*movdicc_real_reversible"): Rename from
+       "*movdicc_real".  Only match reversible comparisons.
+       ("*movdicc_real_nonreversible"): New pattern, split from
+       "*movdicc_real".  Match only nonreversible comparisons.  Exclude
+       reversed alternatives.
+       ("*movdfcc_real_reversible", "*movdfcc_real_nonreversible"):
+       Similar.
+
 2004-11-27  Richard Henderson  <rth@redhat.com>
 
        * config/ia64/ia64.md: Move all define_predicate's ...
index 389b243..827ed4b 100644 (file)
@@ -769,7 +769,7 @@ DIVU %1,%1,%2\;GET %0,:rR\;NEGU %2,0,%0\;CSNN %0,$255,%2")
    ZS%d2 %0,%3,%1
    ZS%D2 %0,%3,%4")
 
-(define_insn "*movdicc_real"
+(define_insn "*movdicc_real_reversible"
   [(set
     (match_operand:DI 0 "register_operand"        "=r ,r ,r ,r")
     (if_then_else:DI
@@ -779,13 +779,28 @@ DIVU %1,%1,%2\;GET %0,:rR\;NEGU %2,0,%0\;CSNN %0,$255,%2")
       (const_int 0)])
      (match_operand:DI 1 "mmix_reg_or_8bit_operand" "rI,0 ,rI,GM")
      (match_operand:DI 4 "mmix_reg_or_8bit_operand" "0 ,rI,GM,rI")))]
-  ""
+  "REVERSIBLE_CC_MODE (GET_MODE (operands[3]))"
   "@
    CS%d2 %0,%3,%1
    CS%D2 %0,%3,%4
    ZS%d2 %0,%3,%1
    ZS%D2 %0,%3,%4")
 
+(define_insn "*movdicc_real_nonreversible"
+  [(set
+    (match_operand:DI 0 "register_operand"        "=r ,r")
+    (if_then_else:DI
+     (match_operator
+      2 "mmix_comparison_operator"
+      [(match_operand 3 "mmix_reg_cc_operand"      "r ,r")
+      (const_int 0)])
+     (match_operand:DI 1 "mmix_reg_or_8bit_operand" "rI,rI")
+     (match_operand:DI 4 "mmix_reg_or_0_operand" "0 ,GM")))]
+  "!REVERSIBLE_CC_MODE (GET_MODE (operands[3]))"
+  "@
+   CS%d2 %0,%3,%1
+   ZS%d2 %0,%3,%1")
+
 (define_insn "*movdfcc_real_foldable"
   [(set
     (match_operand:DF 0 "register_operand"     "=r  ,r  ,r  ,r")
@@ -803,7 +818,7 @@ DIVU %1,%1,%2\;GET %0,:rR\;NEGU %2,0,%0\;CSNN %0,$255,%2")
    ZS%d2 %0,%3,%1
    ZS%D2 %0,%3,%4")
 
-(define_insn "*movdfcc_real"
+(define_insn "*movdfcc_real_reversible"
   [(set
     (match_operand:DF 0 "register_operand"     "=r  ,r  ,r  ,r")
     (if_then_else:DF
@@ -813,13 +828,28 @@ DIVU %1,%1,%2\;GET %0,:rR\;NEGU %2,0,%0\;CSNN %0,$255,%2")
       (const_int 0)])
      (match_operand:DF 1 "mmix_reg_or_0_operand" "rGM,0  ,rGM,GM")
      (match_operand:DF 4 "mmix_reg_or_0_operand" "0  ,rGM,GM ,rGM")))]
-  ""
+  "REVERSIBLE_CC_MODE (GET_MODE (operands[3]))"
   "@
    CS%d2 %0,%3,%1
    CS%D2 %0,%3,%4
    ZS%d2 %0,%3,%1
    ZS%D2 %0,%3,%4")
 
+(define_insn "*movdfcc_real_nonreversible"
+  [(set
+    (match_operand:DF 0 "register_operand"     "=r  ,r")
+    (if_then_else:DF
+     (match_operator
+      2 "mmix_comparison_operator"
+      [(match_operand 3 "mmix_reg_cc_operand"   "r  ,r")
+      (const_int 0)])
+     (match_operand:DF 1 "mmix_reg_or_0_operand" "rGM,rGM")
+     (match_operand:DF 4 "mmix_reg_or_0_operand" "0  ,GM")))]
+  "!REVERSIBLE_CC_MODE (GET_MODE (operands[3]))"
+  "@
+   CS%d2 %0,%3,%1
+   ZS%d2 %0,%3,%1")
+
 ;; FIXME: scc patterns will probably help, I just skip them
 ;; right now.  Revisit.
 \f