Commit 9c922ec7 by Mark Mitchell Committed by Mark Mitchell

Revert this change:

        * fold-const.c (fold): STRIP_NOPS when deciding whether or not
	something is a candidate for optimize_bit_field_compare.

From-SVN: r27318
parent 679dcddb
Wed Jun 2 15:44:15 1999 Mark Mitchell <mark@codesourcery.com>
Revert this change:
* fold-const.c (fold): STRIP_NOPS when deciding whether or not
something is a candidate for optimize_bit_field_compare.
Wed Jun 2 21:53:05 1999 J"orn Rennecke <amylaar@cygnus.co.uk> Wed Jun 2 21:53:05 1999 J"orn Rennecke <amylaar@cygnus.co.uk>
* sh.h (CONST_OK_FOR_I, CONST_OK_FOR_L): Cast VALUE to HOST_WIDE_INT. * sh.h (CONST_OK_FOR_I, CONST_OK_FOR_L): Cast VALUE to HOST_WIDE_INT.
......
...@@ -6034,20 +6034,16 @@ fold (expr) ...@@ -6034,20 +6034,16 @@ fold (expr)
} }
/* If this is a comparison of a field, we may be able to simplify it. */ /* If this is a comparison of a field, we may be able to simplify it. */
{ if ((TREE_CODE (arg0) == COMPONENT_REF
tree xarg0 = arg0; || TREE_CODE (arg0) == BIT_FIELD_REF)
STRIP_NOPS (xarg0); && (code == EQ_EXPR || code == NE_EXPR)
if ((TREE_CODE (xarg0) == COMPONENT_REF /* Handle the constant case even without -O
|| TREE_CODE (xarg0) == BIT_FIELD_REF) to make sure the warnings are given. */
&& (code == EQ_EXPR || code == NE_EXPR) && (optimize || TREE_CODE (arg1) == INTEGER_CST))
/* Handle the constant case even without -O {
to make sure the warnings are given. */ t1 = optimize_bit_field_compare (code, type, arg0, arg1);
&& (optimize || TREE_CODE (arg1) == INTEGER_CST)) return t1 ? t1 : t;
{ }
t1 = optimize_bit_field_compare (code, type, xarg0, arg1);
return t1 ? t1 : t;
}
}
/* If this is a comparison of complex values and either or both sides /* If this is a comparison of complex values and either or both sides
are a COMPLEX_EXPR or COMPLEX_CST, it is best to split up the are a COMPLEX_EXPR or COMPLEX_CST, it is best to split up the
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment