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

Robin Dapp <rdapp at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
     Ever confirmed|0                           |1
             Status|UNCONFIRMED                 |NEW
   Last reconfirmed|                            |2026-09-13

--- Comment #4 from Robin Dapp <rdapp at gcc dot gnu.org> ---
Sorry, I missed this.

The patch doesn't seem correct to me, we already define all modes for which we
can emit a vaadd.  And V_VLSI also includes VxQI modes for which we don't have
an insn.

I think the difference with the patch is that we now have a fallback that works
at a higher LMUL.  Before, LMUL8 was unavailable (we don't have LMUL16 to
extend to) and we would choose LMUL4 with vaadd.  Now there is a fallback
available that works for LMUL8 and -mrvv-max-lmul=dynamic chooses the highest
LMUL.
When compiled with -mrvv-max-lmul=m8 we still get the old LMUL4, vaad.vx
codegen because =m8 compares costs and the LMUL8 fallback with 4 insns is more
expensive than the LMUL4 code with 1 insn.  "dynamic" doesn't yet compare costs
but Bohan Lei is already working on changing that.

So I'd say this is not a proper regression but rather that
-mrvv-max-lmul=dynamic's lack of cost comparison got exposed.  I'd still leave
this open and close once we have cost comparison.

Reply via email to