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

--- Comment #15 from Tamar Christina <tnfchris at gcc dot gnu.org> ---
(In reply to JuzheZhong from comment #14)
> > > > sure, but you can't use BIT_FIELD_REF on VLA vectors.
> > > 
> > > So, for length partial vector. We can use VEC_EXTRACT with index = 0 since
> > > VEC_EXTRACT optab allows VLA vectors now for length target.
> > 
> > Sounds good :)
> 
> I wonder whether ARM SVE can also use this approach VEC_EXTRACT with index =
> 0.
> 
> I guess the only issue is that when mask = all zero. That is, there is no
> active elements, What behavior should be here for early break ?

That shouldn't happen, in that case you wouldn't have entered the loop. To
prevent this there's always a compare of n > 0 at the start of the loops to
skip the vector body entirely.

Reply via email to