mirror of
git://gcc.gnu.org/git/gcc.git
synced 2025-03-08 18:27:33 +08:00
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
This commit is contained in:
parent
541c655f05
commit
1f2f8b29b1
@ -1,3 +1,9 @@
|
||||
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.
|
||||
|
@ -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:
|
||||
|
Loading…
Reference in New Issue
Block a user