On Fri, Nov 11, 2011 at 06:57:58PM +0200, Ira Rosen wrote:
> On 11 November 2011 17:32, Jakub Jelinek <[email protected]> wrote:
> > 2011-11-11 Jakub Jelinek <[email protected]>
> >
> > PR tree-optimization/51058
> > * tree-vect-slp.c (vect_remove_slp_scalar_calls): New function.
> > (vect_schedule_slp): Call it.
> > * tree-vect-stmts.c (vectorizable_call): If slp_node != NULL,
> > don't replace scalar calls with clearing of their lhs here.
>
> I think it's rhs.
I think it is lhs. The scalar call is
lhs = __builtin_copysign (arg1, arg2);
etc. and we transform it to
lhs = 0.0;
> > --- gcc/testsuite/gfortran.fortran-torture/compile/pr51058.f90.jj
> > 2011-11-11 13:26:14.665615842 +0100
> > +++ gcc/testsuite/gfortran.fortran-torture/compile/pr51058.f90 2011-11-11
> > 13:25:50.000000000 +0100
> > @@ -0,0 +1,18 @@
> > +! PR tree-optimization/51058
> > +! { dg-do compile }
> > +subroutine pr51058(n, u, v, w, z)
> > + double precision :: x(3,-2:16384), y(3,-2:16384), b, u, v, w, z
> > + integer :: i, n
> > + common /c/ x, y
> > + do i = 1, n
> > + b = u * int(x(1,i)) + sign(z,x(1,i))
> > + x(1,i) = x(1,i) - b
> > + y(1,i) = y(1,i) - b
> > + b = v * int(x(2,i)) + sign(z,x(2,i))
> > + x(2,i) = x(2,i) - b
> > + y(2,i) = y(2,i) - b
> > + b = w * int(x(3,i)) + sign(z,x(3,i))
> > + x(3,i) = x(3,i) - b
> > + y(3,i) = y(3,i) - b
> > + end do
> > +end subroutine
>
> Please add
> ! { dg-final { cleanup-tree-dump "vect" } }
>
> OK otherwise.
This is not a /vect/ testcase, but fortran torture. I guess
if you really want I could move it over to gfortran.dg/vect/ instead,
then the ! { dg-final { cleanup-tree-dump "vect" } }
would be indeed needed there.
Jakub