On Tue, Jul 14, 2026 at 02:34:57PM +0100, Karl Meakin wrote:
> On 02/07/2026 18:19, Alice Carlotti wrote:
> > On Mon, Jun 29, 2026 at 02:26:53PM +0000, Karl Meakin via Sourceware Forge
> > wrote:
> > > From: Karl Meakin <[email protected]>
> > >
> > > Port the `vreinterpret` family of intrinsics to the pragma-based
> > > framework.
> > >
> > ...
> > > diff --git a/gcc/config/aarch64/aarch64-neon-builtins-base.def
> > > b/gcc/config/aarch64/aarch64-neon-builtins-base.def
> > > index 78b0a39df07b..7257f59bbc56 100644
> > > --- a/gcc/config/aarch64/aarch64-neon-builtins-base.def
> > > +++ b/gcc/config/aarch64/aarch64-neon-builtins-base.def
> > > @@ -17,6 +17,12 @@
> > > along with GCC; see the file COPYING3. If not see
> > > <http://www.gnu.org/licenses/>. */
> > > +// Reinterpret
> > > +#define REQUIRED_EXTENSIONS nonstreaming_only (AARCH64_FL_SIMD)
> > The instructions required to implement the vreinterpret intrinsics (i.e. no
> > instructions at all) are valid in streaming mode, so this gating is wrong.
> > Assuming you agree, can you send a follow-up patch to fix this?
> >
> > Thanks,
> > Alice
> I think it should be left as-is, for two reasons:
> 1. They are not declared to be streaming compatible in the ACLE
I suspect that was either an oversight, or a limitation of the way the ACLE
documentation is currently structured. I don't we should read too much into
the accidental implications of not changing some parts of the spec when adding
new stuff elsewhere.
> 2. Though in practice they are no-ops when optimizations are enabled, at -O0
> they will generate NEON loads/stores which are not allowed in streaming mode
The 128-bit ldr/ldp/str/stp instructions (e.g. ldr q0, [x0]) actually are valid
in streaming mode.
GCC permitted these intrinsics in streaming mode up until your patch disallowed
them.
Alice
> > > +DEF_NEON_FUNCTION (vreinterpret, neon_reinterpret, ("D0,D1"))
> > > +DEF_NEON_FUNCTION (vreinterpretq, neon_reinterpretq, ("Q0,Q1"))
> > > +#undef REQUIRED_EXTENSIONS
> > > +
> > > // Lane manipulation
> > > #define REQUIRED_EXTENSIONS nonstreaming_only (AARCH64_FL_SIMD)
> > > DEF_NEON_FUNCTION (vcreate, all_neon, ("D0,su64"))
>
>