https://gcc.gnu.org/bugzilla/show_bug.cgi?id=124142
--- Comment #5 from rguenther at suse dot de <rguenther at suse dot de> --- On Wed, 18 Feb 2026, tnfchris at gcc dot gnu.org wrote: > https://gcc.gnu.org/bugzilla/show_bug.cgi?id=124142 > > --- Comment #4 from Tamar Christina <tnfchris at gcc dot gnu.org> --- > So this is an uncounted loop, > > for uncounted loops the code does > > /* We can't mask on niters for uncounted loops due to unkown upper bound. > */ > if (LOOP_VINFO_NITERS_UNCOUNTED_P (loop_vinfo)) > LOOP_VINFO_CAN_USE_PARTIAL_VECTORS_P (loop_vinfo) = false; > > which turns off partial masking support. > > But as I noted in PR122103 there was no consensus on what should happen when > we know we need to mask for correctness w.r.t. trapping math, but the target > doesn't support it. > > The trapping math code has > > if (loop_vinfo > && LOOP_VINFO_CAN_USE_PARTIAL_VECTORS_P (loop_vinfo) > && mask_out_inactive) > { > > so we never force the masking, but we also don't stop vectorization. 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.
