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

--- Comment #14 from Li Pan <pan2.li at intel dot com> ---
Looks like option -fmerge-all-constants doesn't work for this case, as well as
RISC-V.

For RISC-V, the CLOBBER exists after tree gimple.

void test (vuint8m1_t *out) {

  uint8_t arr[32] = {1, 2, 7, 1, 3, 4, 5, 3, 1, 0, 1, 2, 4, 4, 9, 9, 1, 2, 7,
1, 3, 4, 5, 3, 1, 0, 1, 2, 4, 4, 9, 9};

  *out = *(vuint8m1_t *)arr;
}

void test (vuint8m1_t * out)
{
  uint8_t arr[32];

  try
    {
      arr =
"\x01\x02\x07\x01\x03\x04\x05\x03\x01\x00\x01\x02\x04\x04\t\t\x01\x02\x07\x01\x03\x04\x05\x03\x01\x00\x01\x02\x04\x04\t\t";
      arr.0_1 = &arr;
      _2 = MEM[(vuint8m1_t *)arr.0_1];
      *out = _2;
    }
  finally
    {
      arr = {CLOBBER(eol)};
    }
}

Reply via email to