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

Richard Guenther <rguenth at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Priority|P3                          |P1
             Status|UNCONFIRMED                 |ASSIGNED
   Last reconfirmed|                            |2011-10-10
         AssignedTo|unassigned at gcc dot       |rguenth at gcc dot gnu.org
                   |gnu.org                     |
     Ever Confirmed|0                           |1

--- Comment #1 from Richard Guenther <rguenth at gcc dot gnu.org> 2011-10-10 
13:56:03 UTC ---
Confirmed.

need_ssa_update_p () changes at

static unsigned int
execute_cleanup_cfg_post_optimizing (void)
{
  cleanup_tree_cfg ();  <-----
  cleanup_dead_labels ();

which folds (via replace_uses_by called from gimple_merge_blocks)

# .MEM_11 = VDEF <.MEM_16>
__builtin_memcpy (&buf, &data, 4);

after propagating single-arg PHIs into it.

And gimplify_and_update_call_from_tree ends up giving up too early:

      if (gimple_in_ssa_p (cfun))
        {
          find_new_referenced_vars (new_stmt);
          mark_symbols_for_renaming (new_stmt);

but even if removing that, it fails to set the VUSE to the first
gimplified statement:

  # .MEM_16 = PHI <.MEM_13(4)>
  # VUSE <.MEM>
  D.2741_17 = MEM[(char * {ref-all})&data];
  # .MEM_11 = VDEF <.MEM>
  MEM[(char * {ref-all})&buf] = D.2741_17;

That is because initially the load does not contain a VUSE so the
whole logic updating virtual operands with reaching vuses does not trigger ...

I have a patch.

Reply via email to