------- Comment #6 from irar at il dot ibm dot com  2010-09-01 11:54 -------
(In reply to comment #5)
> I see before SLP:
> 
> <bb 2>:
>   MEM[(struct A *)this_1(D)].a = 0;
>   MEM[(struct A *)this_1(D)].b = 0;
>   MEM[(struct A *)this_1(D)].c = 0;
>   [LP 2] MEM[(struct A *)this_1(D) + 12B].a = 0;
> 
> and after:
> 
> <bb 2>:
>   vect_cst_.1_16 = { 0, 0, 0, 0 };
>   vect_p.5_17 = &MEM[(struct A *)this_1(D)].a;
>   M*vect_p.5_17{misalignment: 0} = vect_cst_.1_16;
> 
> so EH info has not been properly transfered.  

How should it be done? Is it ok to assume that if one of the old stmts can
throw, then we can set TREE_THIS_NOTRAP for the new access to 0? (and then we
can call maybe_duplicate_eh_stmt (new_stmt, old_stmt)).

Or maybe it's better to avoid vectorization?...

Thanks,
Ira

> Now that only
> MEM[(struct A *)this_1(D) + 12B].a can throw internally but not
> MEM[(struct A *)this_1(D)].c = 0; is a fact that the frontend establishes.
> 
> The following mitigates the problem by simply removing the dead EH edges.
> 
> Index: gcc/tree-vect-slp.c
> ===================================================================
> --- gcc/tree-vect-slp.c (revision 163721)
> +++ gcc/tree-vect-slp.c (working copy)
> @@ -2474,6 +2474,9 @@ vect_schedule_slp (loop_vec_info loop_vi
>          }
>      }
> 
> +  if (bb_vinfo)
> +    gimple_purge_dead_eh_edges (BB_VINFO_BB (bb_vinfo));
> +
>    return is_store;
>  }
> 
> 


-- 

irar at il dot ibm dot com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|4.6.0                       |---


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

Reply via email to