This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[4.1 PATCH] for PR 27891


Hello,

this PR is caused by rewrite_use_outer trying to insert code on an
abnormal edge.  In case it is necessary to split the edge, this does not
work.  The piece of code where this happens no longer exists since 4.2;
for 4.1, this patch makes us avoid inserting the code on the exit edge
if it is abnormal.

Bootstrapped & regtested on i686.

Zdenek

	PR tree-optimization/27891
	* tree-ssa-loop-ivopts.c (rewrite_use_outer): Do not insert code
	on abnormal edge.

Index: tree-ssa-loop-ivopts.c
===================================================================
*** tree-ssa-loop-ivopts.c	(revision 118133)
--- tree-ssa-loop-ivopts.c	(working copy)
*************** rewrite_use_outer (struct ivopts_data *d
*** 5738,5744 ****
  
    exit = single_dom_exit (data->current_loop);
  
!   if (exit)
      {
        if (!cand->iv)
  	{
--- 5738,5744 ----
  
    exit = single_dom_exit (data->current_loop);
  
!   if (exit && !(exit->flags & EDGE_COMPLEX))
      {
        if (!cand->iv)
  	{


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]