http://gcc.gnu.org/bugzilla/show_bug.cgi?id=56778



--- Comment #2 from Richard Biener <rguenth at gcc dot gnu.org> 2013-04-02 
11:19:35 UTC ---

The issue is that gimple_seq_add_seq updates stmts added.  But we update SSA

form _before_ adding the sequence into the IL stream:



  /* End loop-exit-fixes after versioning.  */



  update_ssa (TODO_update_ssa);

  if (cond_expr_stmt_list)

    {

      cond_exp_gsi = gsi_last_bb (condition_bb);

      gsi_insert_seq_before (&cond_exp_gsi, cond_expr_stmt_list,

                             GSI_SAME_STMT);

    }



gimplify.c has a function that does gimple_seq_add_seq_without_update.



There are two ways to fix this, one is to insert the sequence before

updating SSA form, another is to consistently use

gimple_seq_add_seq_without_update.

Or to make gimple_seq_add_seq not update stmts (sequences are inserted

later anyway, which can do the update).  Not sure why it would make sense

at all to update stmt operands for sth not in the IL ...



Well.  I'm going for the first.



Which doesn't fix it because we create an alias-check for a load of a

load appearantly where the latter is not loop invariant.  I presume

this is GATHER support, and eventually the DDR mangling in data-ref

analysis I removed did avoid this to happen.

Reply via email to