[4.1 PATCH] for PR 27891

Zdenek Dvorak rakdver@atrey.karlin.mff.cuni.cz
Sun Oct 29 17:52:00 GMT 2006


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)
  	{



More information about the Gcc-patches mailing list