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

JuzheZhong <juzhe.zhong at rivai dot ai> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |juzhe.zhong at rivai dot ai

--- Comment #3 from JuzheZhong <juzhe.zhong at rivai dot ai> ---
Hi, I think for VLS vectors, we should be able the enhance CSE for this
following case:

#include <stdint.h>

void __attribute__((noinline,noclone))
foo (int *out, int *res, unsigned int n)
{
  int mask[] = { 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1 };
  int i;
  for (i = 0; i < n+16; ++i)
    {
      if (mask[i])
        out[i] = i;
    }
  int o0 = out[0];
  int o7 = out[7];
  int o14 = out[14];
  int o15 = out[15];
  res[0] = o0;
  res[2] = o7;
  res[4] = o14;
  res[6] = o15;
}

since n is unsigned int number, i < n + 16, ARM SVE fail to CSE.
Is it right?

Reply via email to