aboutsummaryrefslogtreecommitdiff
path: root/gcc/fold-const.c
diff options
context:
space:
mode:
authorMark Mitchell <mark@codesourcery.com>1999-06-02 15:42:19 +0000
committerMark Mitchell <mmitchel@gcc.gnu.org>1999-06-02 15:42:19 +0000
commit9c922ec7058c1bd7e4dc496832de1192bc9b71a5 (patch)
treeecc17b6f37b6d8b4b4fd57c8d398185dd0f0777e /gcc/fold-const.c
parent679dcddbfc91a633636f9e1036695725e3a9ee95 (diff)
downloadgcc-9c922ec7058c1bd7e4dc496832de1192bc9b71a5.zip
gcc-9c922ec7058c1bd7e4dc496832de1192bc9b71a5.tar.gz
gcc-9c922ec7058c1bd7e4dc496832de1192bc9b71a5.tar.bz2
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
Diffstat (limited to 'gcc/fold-const.c')
-rw-r--r--gcc/fold-const.c24
1 files changed, 10 insertions, 14 deletions
diff --git a/gcc/fold-const.c b/gcc/fold-const.c
index 7d63ea8..dc9ca93 100644
--- a/gcc/fold-const.c
+++ b/gcc/fold-const.c
@@ -6034,20 +6034,16 @@ fold (expr)
}
/* If this is a comparison of a field, we may be able to simplify it. */
- {
- tree xarg0 = arg0;
- STRIP_NOPS (xarg0);
- if ((TREE_CODE (xarg0) == COMPONENT_REF
- || TREE_CODE (xarg0) == BIT_FIELD_REF)
- && (code == EQ_EXPR || code == NE_EXPR)
- /* Handle the constant case even without -O
- to make sure the warnings are given. */
- && (optimize || TREE_CODE (arg1) == INTEGER_CST))
- {
- t1 = optimize_bit_field_compare (code, type, xarg0, arg1);
- return t1 ? t1 : t;
- }
- }
+ if ((TREE_CODE (arg0) == COMPONENT_REF
+ || TREE_CODE (arg0) == BIT_FIELD_REF)
+ && (code == EQ_EXPR || code == NE_EXPR)
+ /* Handle the constant case even without -O
+ to make sure the warnings are given. */
+ && (optimize || TREE_CODE (arg1) == INTEGER_CST))
+ {
+ t1 = optimize_bit_field_compare (code, type, arg0, arg1);
+ return t1 ? t1 : t;
+ }
/* 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