simplify-rtx.c (simplify_relational_operation): Add case for ! (fabs(x) < 0.0).
authorGeoffrey Keating <geoffk@apple.com>
Sat, 3 May 2003 23:12:41 +0000 (23:12 +0000)
committerGeoffrey Keating <geoffk@gcc.gnu.org>
Sat, 3 May 2003 23:12:41 +0000 (23:12 +0000)
* simplify-rtx.c (simplify_relational_operation): Add case for
! (fabs(x) < 0.0).

From-SVN: r66440

gcc/ChangeLog
gcc/simplify-rtx.c

index 0401c869494d722e9f96723e7f8ac47bf84c7b5c..c63385c479719c2ed4582a02eab78b336f895001 100644 (file)
@@ -1,3 +1,8 @@
+2003-05-03  Geoffrey Keating  <geoffk@apple.com>
+
+       * simplify-rtx.c (simplify_relational_operation): Add case for
+       ! (fabs(x) < 0.0).
+
 2003-05-03  Bruce Korb  <bkorb@gnu.org>
 
        * gcc/fixinc/fixincl.tpl(dne): restore this to force merge conflicts
index 92ee19a0529b9e1eb3aaa8d4a30d74c5f27a2dc7..e4af67564a9856b71cdeb44d79d0dae4ffb83eec 100644 (file)
@@ -2381,10 +2381,21 @@ simplify_relational_operation (code, mode, op0, op1)
              tem = GET_CODE (trueop0) == FLOAT_EXTEND ? XEXP (trueop0, 0)
                                                       : trueop0;
              if (GET_CODE (tem) == ABS)
-               return const1_rtx;
+               return const_true_rtx;
            }
          break;
 
+       case UNGE:
+         /* Optimize ! (abs(x) < 0.0).  */
+         if (trueop1 == CONST0_RTX (mode))
+           {
+             tem = GET_CODE (trueop0) == FLOAT_EXTEND ? XEXP (trueop0, 0)
+                                                      : trueop0;
+             if (GET_CODE (tem) == ABS)
+               return const_true_rtx;
+           }
+         break;
+         
        default:
          break;
        }