From: Richard Biener Date: Wed, 20 Jun 2018 13:16:58 +0000 (+0000) Subject: tree-ssa-alias.c (stmt_kills_ref_p): Revert accidentially committed change. X-Git-Tag: releases/gcc-6.5.0~266 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=d558f39716dab700855a5b757812ed80357f9999;p=thirdparty%2Fgcc.git tree-ssa-alias.c (stmt_kills_ref_p): Revert accidentially committed change. 2018-06-20 Richard Biener * tree-ssa-alias.c (stmt_kills_ref_p): Revert accidentially committed change. From-SVN: r261801 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 14bcf30b2029..0da795e96588 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +2018-06-20 Richard Biener + + * tree-ssa-alias.c (stmt_kills_ref_p): Revert accidentially + committed change. + 2018-06-20 Richard Biener Backport from mainline diff --git a/gcc/tree-ssa-alias.c b/gcc/tree-ssa-alias.c index 3f0011f3d100..08f10e5248b5 100644 --- a/gcc/tree-ssa-alias.c +++ b/gcc/tree-ssa-alias.c @@ -2235,7 +2235,6 @@ stmt_kills_ref_p (gimple *stmt, ao_ref *ref) if (ref->ref) { tree base = ref->ref; - tree innermost_dropped_array_ref = NULL_TREE; if (handled_component_p (base)) { tree saved_lhs0 = NULL_TREE; @@ -2255,11 +2254,6 @@ stmt_kills_ref_p (gimple *stmt, ao_ref *ref) TREE_OPERAND (base, 0) = saved_base0; if (res) break; - /* Remember if we drop an array-ref that we need to - double-check not being at struct end. */ - if (TREE_CODE (base) == ARRAY_REF - || TREE_CODE (base) == ARRAY_RANGE_REF) - innermost_dropped_array_ref = base; /* Otherwise drop handled components of the access. */ base = saved_base0; } @@ -2268,22 +2262,15 @@ stmt_kills_ref_p (gimple *stmt, ao_ref *ref) TREE_OPERAND (lhs, 0) = saved_lhs0; } /* Finally check if the lhs has the same address and size as the - base candidate of the access. Watch out if we have dropped - an array-ref that was at struct end, this means ref->ref may - be outside of the TYPE_SIZE of its base. */ - if ((! innermost_dropped_array_ref - || ! array_at_struct_end_p (innermost_dropped_array_ref)) - && (lhs == base - || (((TYPE_SIZE (TREE_TYPE (lhs)) - == TYPE_SIZE (TREE_TYPE (base))) - || (TYPE_SIZE (TREE_TYPE (lhs)) - && TYPE_SIZE (TREE_TYPE (base)) - && operand_equal_p (TYPE_SIZE (TREE_TYPE (lhs)), - TYPE_SIZE (TREE_TYPE (base)), - 0))) - && operand_equal_p (lhs, base, - OEP_ADDRESS_OF - | OEP_MATCH_SIDE_EFFECTS)))) + base candidate of the access. */ + if (lhs == base + || (((TYPE_SIZE (TREE_TYPE (lhs)) + == TYPE_SIZE (TREE_TYPE (base))) + || (TYPE_SIZE (TREE_TYPE (lhs)) + && TYPE_SIZE (TREE_TYPE (base)) + && operand_equal_p (TYPE_SIZE (TREE_TYPE (lhs)), + TYPE_SIZE (TREE_TYPE (base)), 0))) + && operand_equal_p (lhs, base, OEP_ADDRESS_OF))) return true; }