sh.md (cmpeqdi_t splitter): Fix a reverse testing.
authorKaz Kojima <kkojima@rr.iij4u.or.jp>
Tue, 22 Aug 2000 19:39:56 +0000 (04:39 +0900)
committerJoern Rennecke <amylaar@gcc.gnu.org>
Tue, 22 Aug 2000 19:39:56 +0000 (20:39 +0100)
* config/sh/sh.md (cmpeqdi_t splitter): Fix a reverse testing.

* config/sh/sh.c (prepare_scc_operands): Apply force_reg to
sh_compare_op1 when the mode is DImode and sh_compare_op1 isn't
const0_rtx.

From-SVN: r35889

gcc/ChangeLog
gcc/config/sh/sh.c
gcc/config/sh/sh.md

index 5f56c85..236b38f 100644 (file)
@@ -1,3 +1,11 @@
+Tue Aug 22 20:34:52 2000  Kaz Kojima <kkojima@rr.iij4u.or.jp>
+
+       * config/sh/sh.md (cmpeqdi_t splitter): Fix a reverse testing.
+
+       * config/sh/sh.c (prepare_scc_operands): Apply force_reg to
+       sh_compare_op1 when the mode is DImode and sh_compare_op1 isn't
+       const0_rtx.
+
 2000-08-22  Nick Clifton  <nickc@redhat.com>
 
        * config/arm/lib1funcs.asm (__umodsi3): Before performing any
index 3eeb183..9e2ced6 100644 (file)
@@ -524,6 +524,7 @@ prepare_scc_operands (code)
   if ((code != EQ && code != NE
        && (sh_compare_op1 != const0_rtx
           || code == GTU  || code == GEU || code == LTU || code == LEU))
+      || (mode == DImode && sh_compare_op1 != const0_rtx)
       || (TARGET_SH3E && GET_MODE_CLASS (mode) == MODE_FLOAT))
     sh_compare_op1 = force_reg (mode, sh_compare_op1);
 
index 8702114..051acb8 100644 (file)
                           (match_operand:DI 1 "arith_reg_or_0_operand" "N,r")))]
   "reload_completed"
   [(set (reg:SI 18) (eq:SI (match_dup 2) (match_dup 3)))
-   (set (pc) (if_then_else (ne (reg:SI 18) (const_int 0))
+   (set (pc) (if_then_else (eq (reg:SI 18) (const_int 0))
                           (label_ref (match_dup 6))
                           (pc)))
    (set (reg:SI 18) (eq:SI (match_dup 4) (match_dup 5)))