https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69166

Richard Biener <rguenth at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Priority|P1                          |P2
      Known to work|5.3.1                       |4.6.4
   Target Milestone|6.0                         |4.9.4
            Summary|[6 Regression] ICE in       |[4.9/5/6 Regression] ICE in
                   |get_initial_def_for_reducti |get_initial_def_for_reducti
                   |on, at                      |on, at
                   |tree-vect-loop.c:4188       |tree-vect-loop.c:4188

--- Comment #6 from Richard Biener <rguenth at gcc dot gnu.org> ---
Ok, so we end up with a reduction with a RDIV_EXPR which is because we never
actually call vectorizable_reduction with check_reduction == true because
we are in a nested cycle.

Testcase that also fails on the GCC 5 and 4.9 branches (and 4.8 and 4.7 but not
4.6):

void fn2(double *e, double a)
{
    int b = 0;
    for (; b < 256; b++) {
        int c = 0;
        double x = e[b];
        for (; c < 256; ++c)
          x /= a;
        e[b] = x;
    }
}

Never verifying the actual operation for nested cycles is certainly not what
was intended.  Not that I know much about "nested cycles" vs. "double
reduction"...

Reply via email to