diff options
author | Richard Henderson <rth@redhat.com> | 2001-07-22 23:00:06 -0700 |
---|---|---|
committer | Richard Henderson <rth@gcc.gnu.org> | 2001-07-22 23:00:06 -0700 |
commit | 1f2f8b29b10054d99d2fbb63067143401734ebbf (patch) | |
tree | fcf7dbcf856c331dadfb0a651e5eff3a5fa472f7 /gcc | |
parent | 541c655f055ca0e15b4cb096ca167793979a1ffe (diff) | |
download | gcc-1f2f8b29b10054d99d2fbb63067143401734ebbf.zip gcc-1f2f8b29b10054d99d2fbb63067143401734ebbf.tar.gz gcc-1f2f8b29b10054d99d2fbb63067143401734ebbf.tar.bz2 |
fold-const.c (fold): Test vs FLOAT_TYPE_P instead of INTEGRAL_TYPE_P when...
* fold-const.c (fold): Test vs FLOAT_TYPE_P instead of
INTEGRAL_TYPE_P when folding comparisons with operand_equal_p
arguments.
From-SVN: r44255
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/ChangeLog | 6 | ||||
-rw-r--r-- | gcc/fold-const.c | 4 |
2 files changed, 8 insertions, 2 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index e066b60..ad109ff 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -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 diff --git a/gcc/fold-const.c b/gcc/fold-const.c index 55480d2..6a606ea 100644 --- a/gcc/fold-const.c +++ b/gcc/fold-const.c @@ -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: |