On Thu, Sep 01, 2011 at 10:14:29AM +0200, Richard Guenther wrote: > On Thu, Sep 1, 2011 at 10:12 AM, Ira Rosen <ira.ro...@linaro.org> wrote: > > When vectorizing a function call we replace the original call with a > > dummy statement to ensure that DCE later removes it. We also remove > > its stmt_vec_info, which causes the segfault when we try to access it > > through related pattern stmt. The following patch updates related > > pattern stmt to be the dummy stmt. > > > > Bootstrapped and tested on powerpc64-suse-linux. > > OK for 4.6? > > Ok.
Please also commit the testcase into the trunk. > > PR tree-optimization/50178 > > * tree-vect-stmts.c (vectorizable_call): Update the related > > pattern statement > > before deleting the original call. > > (vect_transform_stmt): Don't expect the related pattern statement match > > the > > original statement after transformation. > > > > testsuite/ChangeLog: > > > > PR tree-optimization/50178 > > * gfortran.dg/vect/pr50178.f90: New test. Jakub