On Tue, Jun 11, 2013 at 09:30:29PM +0200, Marc Glisse wrote:
> >I'd be curious how often this triggers in GCC itself as well.
> 
> Do you know a convenient way to test that?

Perhaps you could put in the 
if (gimple_assign_rhs_code (stmt) == TREE_CODE (gimple_assign_lhs (stmt))
    && operand_equal_p (gimple_assign_rhs1 (stmt),
                        gimple_assign_lhs (stmt), 0))
{
 ...
}

something like
  FILE *f = fopen ("/tmp/self", "a");
  fprintf (f, "%s ", main_input_filename);
  print_gimple_stmt (f, stmt, 0, TDF_VOPS|TDF_MEMSYMS);
  fclose (f);

(completely untested)

        Marek

Reply via email to