You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
vsetvli local eliminate is only consider the current demand instead of
full demand, and it will use that incomplete info to remove vsetvli.
Give following example from PR114747:
vsetvli a5,a1,e8,m4,ta,mu # 57, ratio=2, sew=8, lmul=4
vsetvli zero,a5,e16,m8,ta,ma # 58, ratio=2, sew=16, lmul=8
vle8.v v8,0(a0) # 13, demand ratio=2
vzext.vf2 v24,v8 # 14, demand sew=16 and lmul=8
Insn gcc-mirror#58 will removed because gcc-mirror#57 has satisfied demand of gcc-mirror#13, but it's
not consider gcc-mirror#14.
It should doing more demand analyze, but this bug only present in GCC 13
branch, and we should not change too much on this release branch, so the best
way is make the check more conservative - remove only if the target
vsetvl_discard_result having same SEW and LMUL as the source vsetvli.
gcc/ChangeLog:
PR target/114747
* config/riscv/riscv-vsetvl.cc (local_eliminate_vsetvl_insn):
Check target vsetvl_discard_result and source vsetvli has same
SEW and LMUL.
gcc/testsuite/ChangeLog:
* gcc.target/riscv/rvv/vsetvl/pr114747.c: New.
0 commit comments