What we could do is

    prev.set_ratio (calculate_ratio (prev.get_sew (), prev.get_vlmul ()));
    prev.set_vlmul (calculate_vlmul (prev.get_sew (), prev.get_ratio ()));

No, that also doesn't work because the ratio can be invalid then.

We fuse two vsetvls.  One of them has a larger SEW which we use.  Then
we either
- Keep the old ratio and calculate a new LMUL. That might lead to invalid LMUL. - Keep the old LMUL and calculate a new ratio. That might lead to an invalid ratio.

I think the easiest way out is to copy the vsetvl with the larger SEW.

--
Regards
Robin

Reply via email to