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.

For early break I'll take a harder stand and block vectorization.

So testing a patch.

Reply via email to