rs6000.c (rs6000_emit_minmax): Treat unsigned max/mins as unsigned GE compares.
authorAldy Hernandez <aldyh@redhat.com>
Wed, 12 Jun 2002 00:27:03 +0000 (00:27 +0000)
committerAldy Hernandez <aldyh@gcc.gnu.org>
Wed, 12 Jun 2002 00:27:03 +0000 (00:27 +0000)
2002-06-11  Aldy Hernandez  <aldyh@redhat.com>

        * config/rs6000/rs6000.c (rs6000_emit_minmax): Treat unsigned
        max/mins as unsigned GE compares.

From-SVN: r54539

gcc/ChangeLog
gcc/config/rs6000/rs6000.c

index ae0e26dfe053e6f2a9cd6cb11b171698f48929df..5b1831130f63ca79fb4f648c7d9076d952f42fc8 100644 (file)
@@ -1,3 +1,8 @@
+2002-06-11  Aldy Hernandez  <aldyh@redhat.com>
+
+        * config/rs6000/rs6000.c (rs6000_emit_minmax): Treat unsigned
+        max/mins as unsigned GE compares.
+
 2002-06-11  Jason Thorpe  <thorpej@wasabisystems.com>
 
        * config.gcc (vax-*-bsd*): Add vax/bsd.h to ${tm_file}. 
index 6dbb7e0cb52d26687547cb9ce900dfb499d6a948..00f9aa76754fa65fddff62fcb94cec0ec7becece 100644 (file)
@@ -7534,12 +7534,19 @@ rs6000_emit_minmax (dest, code, op0, op1)
      rtx op1;
 {
   enum machine_mode mode = GET_MODE (op0);
+  enum rtx_code c;
   rtx target;
+
+  if (code == SMAX || code == SMIN)
+    c = GE;
+  else
+    c = GEU;
+
   if (code == SMAX || code == UMAX)
-    target = emit_conditional_move (dest, GE, op0, op1, mode, 
+    target = emit_conditional_move (dest, c, op0, op1, mode, 
                                    op0, op1, mode, 0);
   else
-    target = emit_conditional_move (dest, GE, op0, op1, mode, 
+    target = emit_conditional_move (dest, c, op0, op1, mode, 
                                    op1, op0, mode, 0);
   if (target == NULL_RTX)
     abort ();