On Fri, Nov 21, 2025 at 01:16:47PM +0100, Richard Biener wrote:
> > --- gcc/omp-simd-clone.cc 2025-04-08 14:08:57.115200232 +0200
> > +++ gcc/omp-simd-clone.cc 2025-11-21 13:09:10.733282017 +0100
> > @@ -892,6 +892,7 @@ simd_clone_adjust_argument_types (struct
> > sc->args[i].orig_type = base_type;
> > sc->args[i].arg_type = SIMD_CLONE_ARG_TYPE_MASK;
> > sc->args[i].vector_type = mask_type;
> > + sc->args[i].linear_step = k;
> > }
> >
> > if (!node->definition)
> > or = veclen.to_constant (); (though that would need to be conditional
> > on mask_type being INTEGRAL_TYPE_P or sc->mask_mode != VOIDmode.
>
> That would be quite useful indeed. I thought of using mask_mode,
> but for 'double' and simdlen == 16 (so two vector double args)
> we get there SImode and not QImode. That is, I thought of simply
> ceil dividing simdlen by GET_MODE_BITSIZE (mask_mode) ...
sc->mask_mode should have the same mode as vector_type (unless
sc->mask_mode is VOIDmode). That is the way where the backend
can say that the mask isn't passed in unsigned short but unsigned int
even when it only needs 16 bits in it etc.
> I'll include the above with a comment and adjust the docs accordingly.
Ok.
Jakub