[Bug middle-end/99395] s116 benchmark of TSVC is vectorized by clang and not by gcc

hubicka at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Thu Mar 4 23:24:50 GMT 2021


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

--- Comment #1 from Jan Hubicka <hubicka at gcc dot gnu.org> ---
Loop is:

real_t s116 (struct args_t * func_args)
{
  int i;
  int nl;
  static const char __func__[5] = "s116";
  struct timeval * _1;
  int _2;
  float _3;
  float _4;
  float _5;
  int _6;
  float _7;
  float _8;
  float _9;
  int _10;
  float _11;
  float _12;
  float _13;
  int _14;
  float _15;
  float _16;
  float _17;
  int _18;
  float _19;
  float _20;
  float _21;
  struct timeval * _22;
  real_t _33;
  unsigned int ivtmp_43;
  unsigned int ivtmp_44;
  unsigned int ivtmp_45;
  unsigned int ivtmp_46;

  <bb 2> [local count: 108459]:
  initialise_arrays (&__func__);
  _1 = &func_args_29(D)->t1;
  gettimeofday (_1, 0B);
  goto <bb 5>; [100.00%]

  <bb 8> [local count: 1052266996]:

  <bb 3> [local count: 1063004409]:
  # i_48 = PHI <_18(8), 0(5)>
  # ivtmp_46 = PHI <ivtmp_45(8), 6399(5)>
  _2 = i_48 + 1;
  _3 = a[_2];
  _4 = a[i_48];
  _5 = _3 * _4;
  a[i_48] = _5;
  _6 = i_48 + 2;
  _7 = a[_6];
  _8 = a[_2];
  _9 = _7 * _8;
  a[_2] = _9;
  _10 = i_48 + 3;
  _11 = a[_10];
  _12 = a[_6];
  _13 = _11 * _12;
  a[_6] = _13;
  _14 = i_48 + 4;
  _15 = a[_14];
  _16 = a[_10];
  _17 = _15 * _16;
  a[_10] = _17;
  _18 = i_48 + 5;
  _19 = a[_18];
  _20 = a[_14];
  _21 = _19 * _20;
  a[_14] = _21;
  ivtmp_45 = ivtmp_46 - 1;
  if (ivtmp_45 != 0)
    goto <bb 8>; [98.99%]
  else
    goto <bb 4>; [1.01%]


tsvc.c:275:18: missed:   not vectorized, possible dependence between data-refs
a[i_48] and a[_18]
tsvc.c:274:27: missed:  bad data dependence.

_18 = i_48 + 5 and stride is 5...


More information about the Gcc-bugs mailing list