(prepare_scc_operands, from_compare): Force constant 0 into
authorJim Wilson <wilson@gcc.gnu.org>
Tue, 7 Feb 1995 20:57:00 +0000 (12:57 -0800)
committerJim Wilson <wilson@gcc.gnu.org>
Tue, 7 Feb 1995 20:57:00 +0000 (12:57 -0800)
register for unsigned comparisons.

From-SVN: r8891

gcc/config/sh/sh.c

index 0fc3953dafe5ac4fddbc255d62526e9df0553228..7e6f325759c03b2105d90ec9e68800407e29eeff 100644 (file)
@@ -823,7 +823,9 @@ prepare_scc_operands (code)
        }
 
       sh_compare_op0 = force_reg (SImode, sh_compare_op0);
-      if (code != EQ && code != NE && sh_compare_op1 != const0_rtx)
+      if (code != EQ && code != NE
+         && (sh_compare_op1 != const0_rtx
+             || code == GTU  || code == GEU || code == LTU || code == LEU))
        sh_compare_op1 = force_reg (SImode, sh_compare_op1);
 
       emit_insn (gen_rtx (SET, VOIDmode,
@@ -2013,7 +2015,8 @@ from_compare (operands, code)
     {
       /* Force args into regs, since we can't use constants here */
       sh_compare_op0 = force_reg (SImode, sh_compare_op0);
-      if (sh_compare_op1 != const0_rtx)
+      if (sh_compare_op1 != const0_rtx
+         || code == GTU  || code == GEU || code == LTU || code == LEU)
        sh_compare_op1 = force_reg (SImode, sh_compare_op1);
     }
   operands[1] = sh_compare_op0;