On 7/14/25 7:55 AM, Robin Dapp wrote:
Hi,

In PR120297 we fuse
  vsetvl e8,mf2,...
  vsetvl e64,m1,...
into
  vsetvl e64,m4,...

Individually, that's ok but we also change the new vsetvl's demand to
"SEW only" even though the first original one demanded SEW >= 8 and
ratio = 16.

As we forget the ratio after the merge we find that the vsetvl following
the merged one has ratio = 64 demand and we fuse into
  vsetvl e64,m1,..
which obviously doesn't have ratio = 16 any more.

Regtested on rv64gcv_zvl512b.

Regards
Robin

     PR target/120297

gcc/ChangeLog:

     * config/riscv/riscv-vsetvl.def: Do not forget ratio demand of
     previous vsetvl.

gcc/testsuite/ChangeLog:

     * gcc.target/riscv/rvv/pr120297.c: New test.
OK.
jeff

Reply via email to