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

--- Comment #4 from Oleksandr Kulkov <adamant.pwn at gmail dot com> ---
Retested with GCC 17.0.0 20261023 (7ae37a76b3274e8adf0a15171008d4eb89910535),
after the PR121688 changes. The original eight-element example now uses packed
F16C at -O3, but only after unrolling and SLP; the loop vectorizer still
rejects it. At -O2 it remains scalar.

A variable-length version still generates scalar conversions with -O3
-march=x86-64-v3:

```c
void convv(_Float16 *restrict h, const float *restrict f, int count)
{
  for (int n = 0; n < count; ++n)
    h[n] = f[n];
}
```

With -fopt-info-vec-all, GCC reports “not vectorized: no vectype for stmt” and
“scalar_type: const float”. Adding -mavx512fp16 vectorizes this loop. An
explicit __builtin_convertvector between four-element float/_Float16 vectors
now uses packed F16C, so that backend support is present while loop
vectorization remains missing.

Reply via email to