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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |aoliva at gcc dot gnu.org,
                   |                            |jakub at gcc dot gnu.org

--- Comment #18 from Richard Guenther <rguenth at gcc dot gnu.org> 2011-10-11 
14:42:46 UTC ---
(In reply to comment #15)
> What probably causes this is that we don't merge the blocks
> 
>   # i_29 = PHI <i_10(3), 0(2)>
> copy_block:
>   D.3506_7 = v_20->chars;
>   D.3507_8 = D.3506_7 + i_29;
>   *D.3507_8 = c_9(D);
>   i_10 = i_29 + 1;
>   goto <bb 3> (loop_back);
> 
> loop_back:
>   loop_cond_11 = i_10 < n_3(D);
>   if (loop_cond_11 != 0)
>     goto <bb 4> (copy_block);
>   else
>     goto <bb 5> (end);
> 
> even though it's a fallthru edge.  We don't do this to preserve user labels
> for debugging (and mind, no code-gen differences between -g0 vs. -g).

Yes.  With

Index: gcc/tree-cfg.c
===================================================================
--- gcc/tree-cfg.c      (revision 179804)
+++ gcc/tree-cfg.c      (working copy)
@@ -1456,7 +1460,7 @@ gimple_can_merge_blocks_p (basic_block a

       /* Do not remove user labels.  */
       if (!DECL_ARTIFICIAL (lab))
-       return false;
+       ;
     }

   /* Protect the loop latches.  */

we merge the blocks and vectorize both loops.

The above patch is not acceptable though, which leaves making the vectorizer
deal with trivial control-flow (or a new GIMPLE_DEBUG kind that would
preserve the label?).

Reply via email to