* fold-const.c (fold): Test vs FLOAT_TYPE_P instead of
authorrth <rth@138bc75d-0d04-0410-961f-82ee72b054a4>
Mon, 23 Jul 2001 06:00:06 +0000 (06:00 +0000)
committerrth <rth@138bc75d-0d04-0410-961f-82ee72b054a4>
Mon, 23 Jul 2001 06:00:06 +0000 (06:00 +0000)
        INTEGRAL_TYPE_P when folding comparisons with operand_equal_p
        arguments.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@44255 138bc75d-0d04-0410-961f-82ee72b054a4

gcc/ChangeLog
gcc/fold-const.c

index e066b60..ad109ff 100644 (file)
@@ -1,5 +1,11 @@
 2001-07-22  Richard Henderson  <rth@redhat.com>
 
+       * fold-const.c (fold): Test vs FLOAT_TYPE_P instead of
+       INTEGRAL_TYPE_P when folding comparisons with operand_equal_p
+       arguments.
+
+2001-07-22  Richard Henderson  <rth@redhat.com>
+
        * m68k.c (const_uint32_operand): Abort if mode is <= 32 bits.
        (const_sint32_operand): Likewise.
        * m68k.md (anon mulsi pattern): Use const_int_operand not
index 55480d2..6a606ea 100644 (file)
@@ -6516,7 +6516,7 @@ fold (expr)
            case EQ_EXPR:
            case GE_EXPR:
            case LE_EXPR:
-             if (INTEGRAL_TYPE_P (TREE_TYPE (arg0)))
+             if (! FLOAT_TYPE_P (TREE_TYPE (arg0)))
                return constant_boolean_node (1, type);
              code = EQ_EXPR;
              TREE_SET_CODE (t, code);
@@ -6524,7 +6524,7 @@ fold (expr)
 
            case NE_EXPR:
              /* For NE, we can only do this simplification if integer.  */
-             if (! INTEGRAL_TYPE_P (TREE_TYPE (arg0)))
+             if (FLOAT_TYPE_P (TREE_TYPE (arg0)))
                break;
              /* ... fall through ...  */
            case GT_EXPR: