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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |ASSIGNED
   Last reconfirmed|                            |2017-10-05
           Assignee|unassigned at gcc dot gnu.org      |rguenth at gcc dot 
gnu.org
     Ever confirmed|0                           |1

--- Comment #2 from Richard Biener <rguenth at gcc dot gnu.org> ---
Hmm, it's the IV update that makes it not pure SLP:

_118 = _649 + 1;

it's vect_used_only_live, loop_vect and vect_internal_def.

Simplified C testcase:

struct reflection_type
{
  int h;
  int k;
  int l;
  double f_exp;
  double f_sigma;
  _Complex double f_calc;
  double f_pred;
  double i_exp;
  double i_sigma;
  double i_pred;
};

double y, w;
int foo (struct reflection_type *r, int n, unsigned s)
{
  int i;
  y = 0;
  w = 0;
  for (i = 1; i < n; ++i)
    {
      struct reflection_type *x = &r[i*s];
      double fpred = x->f_pred;
      double fexp = x->f_exp;
      double tem = (fpred - fexp);
      y += __builtin_fabs (tem / x->f_sigma);
      w += __builtin_fabs (tem / fexp);
    }
  return i;
}

needs -Ofast -mavx2 -m32 -fnop-tree-scev-cprop.

Reply via email to