[Bug tree-optimization/101548] dependence analysis fails with .MASK_STORE

rguenth at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Wed Jul 21 09:15:59 GMT 2021


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

--- Comment #1 from Richard Biener <rguenth at gcc dot gnu.org> ---
It works with

void foo (double * __restrict a, double *b)
{
  for (int i = 0; i < 1024; ++i)
    {
      double tem = a[i];
      if (b[i] < tem)
        a[i] = tem + b[i];
    }
}

and

  <bb 3> [local count: 1063004409]:
  # i_20 = PHI <i_15(7), 0(15)>
  # ivtmp_19 = PHI <ivtmp_18(7), 1024(15)>
  _1 = (long unsigned int) i_20;
  _2 = _1 * 8;
  _3 = a_11(D) + _2;
  tem_12 = *_3;
  _4 = b_13(D) + _2;
  _5 = *_4;
  _6 = _5 + tem_12;
  _34 = _5 < tem_12;
  .MASK_STORE (_3, 64B, _34, _6);
  i_15 = i_20 + 1;
  ivtmp_18 = ivtmp_19 - 1;
  if (ivtmp_18 != 0)
    goto <bb 7>; [98.99%]
  else
    goto <bb 6>; [1.01%]

so this is likely a duplicate of the old issue of refs based on a pointer
(which .MASK_STORE with &a[i] is) wrt refs based not on a pointer (a[i]).


More information about the Gcc-bugs mailing list