Torbjorn SVENSSON [Friday, 14 August 2026, 19:28:01 CEST]:
> On 2026-08-14 17:37, Matthias Kretz wrote:
> > I've been trying really hard to reproduce the issue. And failed so far.
> > I now tried to build a --target=arm-none-eabi GCC locally, but that
> > doesn't
> > compile. How do you compile it?
> 
> I'm using this way to build an arm-none-eabi toolchain:
> https://github.com/STMicroelectronics/gnu-tools-for-stm32/
> 
> […]

Thanks. I'll try that.

> > I fear we're currently at a point where neither of us really understand
> > the
> > problem and whether your patch is the best solution.
> 
> I see that most of the commits for the experimental/bits/simd* where done by
> you over the years, so if you do not know how this works, then who might?

Well, I understand the library API and have a mental model of how user code 
should translate into something the optimizer understands. There's still a 
huge gap between where this needs to be and where we are, because the 
intrinsics interfaces are not communicating intent. They are often 
communicating only instruction sequences.

E.g. in this case I want to tell the compiler: "turn a vector mask into a bit 
mask". But GCC still has no frontend type for masks (only vectors that 
sometimes happen to be known to be masks). So until we get there (and sorry 
for being slow in proposing solutions...) the library calls intrinsics or 
builtins to achieve the necessary semantics.

This specific case is one where the intrinsics interface doesn't match my 
expectation. Which happens. I'm not infallible. ;-) Now, to get it right I 
need to understand the ARM intrinsics API. That's where I'm at right now. I 
don't understand why it works for aarch64 and arm-linux but not for arm-none. 
There might be a larger issue that requires a bigger/different change. If we 
just make it compile it might do the wrong thing. I rather have it not compile 
than silently do weird things.

-- 
──────────────────────────────────────────────────────────────────────────
 Dr. Matthias Kretz                           https://mattkretz.github.io
 GSI Helmholtz Center for Heavy Ion Research               https://gsi.de
 std::simd
──────────────────────────────────────────────────────────────────────────

Reply via email to