diff options
author | rguenth <rguenth@138bc75d-0d04-0410-961f-82ee72b054a4> | 2015-07-28 07:20:33 +0000 |
---|---|---|
committer | rguenth <rguenth@138bc75d-0d04-0410-961f-82ee72b054a4> | 2015-07-28 07:20:33 +0000 |
commit | 16db63950c10c3c175811bdcf7dc4c6785dbc294 (patch) | |
tree | 22a38c7c40f26f676e0c77c00ac8701f1fda7272 /gcc/fold-const.c | |
parent | ddc9c9893ac94a5bf3867278c6113e4dbb853d99 (diff) | |
download | gcc-16db63950c10c3c175811bdcf7dc4c6785dbc294.tar.gz |
2015-07-28 Richard Biener <rguenther@suse.de>
* fold-const.c (fold_comparison): Remove equality folding
of decl addresses ...
* match.pd: ... here and merge with existing pattern.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@226299 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/fold-const.c')
-rw-r--r-- | gcc/fold-const.c | 24 |
1 files changed, 0 insertions, 24 deletions
diff --git a/gcc/fold-const.c b/gcc/fold-const.c index e69b1d04133..f2bb602cf84 100644 --- a/gcc/fold-const.c +++ b/gcc/fold-const.c @@ -8511,30 +8511,6 @@ fold_comparison (location_t loc, enum tree_code code, tree type, return fold_build2_loc (loc, code, type, offset0, offset1); } } - /* For non-equal bases we can simplify if they are addresses - declarations with different addresses. */ - else if (indirect_base0 && indirect_base1 - /* We know that !operand_equal_p (base0, base1, 0) - because the if condition was false. But make - sure two decls are not the same. */ - && base0 != base1 - && TREE_CODE (arg0) == ADDR_EXPR - && TREE_CODE (arg1) == ADDR_EXPR - && DECL_P (base0) - && DECL_P (base1) - /* Watch for aliases. */ - && (!decl_in_symtab_p (base0) - || !decl_in_symtab_p (base1) - || !symtab_node::get_create (base0)->equal_address_to - (symtab_node::get_create (base1)))) - { - if (code == EQ_EXPR) - return omit_two_operands_loc (loc, type, boolean_false_node, - arg0, arg1); - else if (code == NE_EXPR) - return omit_two_operands_loc (loc, type, boolean_true_node, - arg0, arg1); - } /* For equal offsets we can simplify to a comparison of the base addresses. */ else if (bitpos0 == bitpos1 |