From: Aldy Hernandez Date: Wed, 12 Jun 2002 00:27:03 +0000 (+0000) Subject: rs6000.c (rs6000_emit_minmax): Treat unsigned max/mins as unsigned GE compares. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=5dc8d5361697ad7378b9ff360aaaec980091d6b4;p=gcc.git rs6000.c (rs6000_emit_minmax): Treat unsigned max/mins as unsigned GE compares. 2002-06-11 Aldy Hernandez * config/rs6000/rs6000.c (rs6000_emit_minmax): Treat unsigned max/mins as unsigned GE compares. From-SVN: r54539 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index ae0e26dfe05..5b1831130f6 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +2002-06-11 Aldy Hernandez + + * config/rs6000/rs6000.c (rs6000_emit_minmax): Treat unsigned + max/mins as unsigned GE compares. + 2002-06-11 Jason Thorpe * config.gcc (vax-*-bsd*): Add vax/bsd.h to ${tm_file}. diff --git a/gcc/config/rs6000/rs6000.c b/gcc/config/rs6000/rs6000.c index 6dbb7e0cb52..00f9aa76754 100644 --- a/gcc/config/rs6000/rs6000.c +++ b/gcc/config/rs6000/rs6000.c @@ -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 ();