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

            Bug ID: 107259
           Summary: Vectorize VxHF _Float16 modes using partial vectors
                    without -mavx512vl
           Product: gcc
           Version: 12.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: target
          Assignee: unassigned at gcc dot gnu.org
          Reporter: ubizjak at gmail dot com
  Target Milestone: ---

The following testcase:

--cut here--
#define N 16

_Float16 r[N], a[N], b[N];

void foo (void)
{
  for (int i = 0; i < N; i++)
    r[i] = a[i] + b[i];
}
--cut here--

can be vectorized with -O2 -mavx512fp16 -mavx512vl, but not when -mavx512vl is
omitted. However, the test can still be vectorized using partial vectors.

The testcase should be vectorized for all N < 32, even without -mavx512vl.

Reply via email to