On Wed, Mar 02, 2016 at 05:17:17PM +0100, Martin Liška wrote:
> 2016-03-02  Martin Liska  <mli...@suse.cz>
> 

Missing
        PR tree-optimization/70043
(both in gcc/ and gcc/testsuite/ ChangeLog entry).

> --- /dev/null
> +++ b/gcc/testsuite/gfortran.dg/vect/pr70043.f90
> @@ -0,0 +1,14 @@
> +! { dg-additional-options "-Ofast -g -march=haswell" }
> +! { dg-do compile  }

Please change this to:
! PR tree-optimization/70043
! { dg-do compile }
! { dg-additional-options "-Ofast -g" }
! { dg-additional-options "-march=haswell" { target i?86-*-* x86_64-*-* } }

> +
> +subroutine fn1(a, b)
> +  real(8), intent(in) ::  b(100)
> +  real(8), intent(inout) :: a(100)
> +  real(8) c
> +  do i=0,100
> +     if( a(i) < 0.0 ) then
> +        c =  a(i) * b(i)
> +        a(i) = a(i) - c / b(i)
> +     endif
> +  enddo
> +end subroutine fn1
> diff --git a/gcc/tree-vect-loop.c b/gcc/tree-vect-loop.c
> index 8c34669..7ab36a8 100644
> --- a/gcc/tree-vect-loop.c
> +++ b/gcc/tree-vect-loop.c
> @@ -7077,7 +7077,10 @@ optimize_mask_stores (struct loop *loop)
>  
>             /* Skip debug statements.  */
>             if (is_gimple_debug (gsi_stmt (gsi)))
> -             continue;
> +             {
> +               gsi_prev (&gsi);
> +               continue;
> +             }
>             stmt1 = gsi_stmt (gsi);
>             /* Do not consider statements writing to memory or having
>                volatile operand.  */

Ok with those changes.

        Jakub

Reply via email to