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

--- Comment #4 from Richard Biener <rguenth at gcc dot gnu.org> ---
GIMPLE testcase for the vectorization (w/o driver part).  If you make the
condition non-uniform then we include the _28 SLP def in the SLP and
everything goes correct.  So it might be that we need to special-case
"external bools", but I thought we pattern those as != 0 - guess we elide
that when we see the BIT_IOR_EXPR use (but that would assume we vectorize
that part as well).

int test_var_3;
short arr_20[16];
int testa[1024];

void __GIMPLE (ssa,startwith("slp"))
test (long long unsigned int var_1, long long unsigned int var_12,
      short int a, short int b, short int c, short int d)
{
  _Bool tem2;
  _Bool tem;
  unsigned int i_5;
  int _24;
  _Bool _28;
  short int _30;
  short int _32;

  __BB(2):
  _24 = test_var_3;
  tem_25 = _24 != 0;
  tem2_26 = var_1_11(D) != 0ul;
  _28 = tem_25 | tem2_26;
  _30 = _28 !=  _Literal (_Bool) 0 ? a_16(D) : b_15(D);
  arr_20[0u] = _30;
  _32 = _28 != _Literal (_Bool) 0 ? c_19(D) : d_18(D);
  arr_20[8u] = _32;
  arr_20[1u] = _30;
  arr_20[9u] = _32;
  arr_20[2u] = _30;
  arr_20[10u] = _32;
  arr_20[3u] = _30;
  arr_20[11u] = _32;
  arr_20[4u] = _30;
  arr_20[12u] = _32;
  arr_20[5u] = _30;
  arr_20[13u] = _32;
  arr_20[6u] = _30;
  arr_20[14u] = _32;
  arr_20[7u] = _30;
  arr_20[15u] = _32;
  return;

}

Reply via email to