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

--- Comment #6 from Tamar Christina <tnfchris at gcc dot gnu.org> ---
(In reply to [email protected] from comment #5)
> On Wed, 18 Feb 2026, tnfchris at gcc dot gnu.org wrote:
>
> I think LOOP_VINFO_NITERS_UNCOUNTED_P always needs partial vectors, no?
> Or is the idea that all side-effects are only executed after all
> early breaks?  Then the early-break conditioning is wrong here.

I think the idea was that for LOOP_VINFO_NITERS_UNCOUNTED_P you can't do
partial iterations because you don't have anything to create a mask from.

To use LOOP_VINFO_NITERS_UNCOUNTED_P with partial masking you need first
faulting loads, as that'll give you your loop mask for the iteration.

> Then the early-break conditioning is wrong here.

Yes, Early break without masking relies on alignment but that also means that
the operation must not trap.  So the condition needs to stop vectorization
whenever we have early break + trap + non partial vectors, which is indeed
missing.

But normal early break *can* use partial vectors, which is why we haven't
noticed it before. So it's not a 16 regression FWIW.

There's some testsuite fall out from enforcing this, so I'm going through
them now.

Reply via email to