On Fri, 21 Nov 2025, Jakub Jelinek wrote: > 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.
Yeah, but for V8DFmode we actually create a vector type with QImode, not agreeing with mask_mode here. > > I'll include the above with a comment and adjust the docs accordingly. > > Ok. And it seems to work. I'll post a v2 after testing finished. Richard. > Jakub > > -- Richard Biener <[email protected]> SUSE Software Solutions Germany GmbH, Frankenstrasse 146, 90461 Nuernberg, Germany; GF: Jochen Jaser, Andrew McDonald, Werner Knoblich; (HRB 36809, AG Nuernberg)
