https://gcc.gnu.org/bugzilla/show_bug.cgi?id=89546

Jakub Jelinek <jakub at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
   Last reconfirmed|                            |2019-03-01
                 CC|                            |jamborm at gcc dot gnu.org
   Target Milestone|---                         |8.4
     Ever confirmed|0                           |1

--- Comment #1 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
I've tried to bisect it further, which exact SRA change makes a difference,
using:
--- gcc/tree-sra.c.jj   2019-03-01 00:21:16.431273877 +0100
+++ gcc/tree-sra.c      2019-03-01 13:09:22.437370185 +0100
@@ -650,12 +650,22 @@ pop_access_from_work_queue (void)
   return access;
 }

+static bool old_rev;
+static int cntxx;

 /* Allocate necessary structures.  */

 static void
 sra_initialize (void)
 {
+if (getenv ("SRA") != NULL)
+{
+  int xx = atoi (getenv ("SRA"));
+  if (cntxx++ < xx)
+    old_rev = true;
+  else
+    old_rev = false;
+}
   candidate_bitmap = BITMAP_ALLOC (NULL);
   candidates = new hash_table<uid_decl_hasher>
     (vec_safe_length (cfun->local_decls) / 2);
@@ -1156,6 +1166,8 @@ contains_vce_or_bfcref_p (const_tree ref
       ref = TREE_OPERAND (ref, 0);
     }

+if (old_rev) return false;
+
   if (TREE_CODE (ref) != MEM_REF
       || TREE_CODE (TREE_OPERAND (ref, 0)) != ADDR_EXPR)
     return false;
@@ -1367,7 +1379,7 @@ build_accesses_from_assign (gimple *stmt
       if (should_scalarize_away_bitmap && !gimple_has_volatile_ops (stmt)
          && !is_gimple_reg_type (racc->type))
        {
-         if (contains_vce_or_bfcref_p (rhs))
+         if (!old_rev && contains_vce_or_bfcref_p (rhs))
            bitmap_set_bit (cannot_scalarize_away_bitmap,
                            DECL_UID (racc->base));
          else

patch applied on top of r255510, so that some SRA invocations are done the
r255509 way and others r255510 way and it seems it is esra pass in get_tail
that matters whether the testcase aborts or succeeds.

Reply via email to