On 12/19/23 23:50, Juzhe-Zhong wrote:
This patch fixes bugs in the fusion of this following case:

li a5,-1
vmv.s.x v0,a5 -> demand any non-zero AVL
vsetvli a5, ...

Incorrect fusion after VSETVL PASS:

li a5,-1
vsetvli a5...
vmv.s.x v0, a5 --> a5 is modified as incorrect value.

We disallow this incorrect fusion above.

Full coverage testing of RV64 and RV32 no regression.

        PR target/113087

gcc/ChangeLog:

        * config/riscv/riscv-vsetvl.cc: Disallow fusion when VL modification 
pollutes non AVL use.

gcc/testsuite/ChangeLog:

        * gcc.target/riscv/rvv/autovec/pr113087-1.c: New test.
OK.
jeff

Reply via email to