LGTM.
+ /* Don't perform earliest fusion on unrelated edge. */
+ if (bitmap_count_bits (e) != 1)
+ continue;
This could still use a comment why e is "unrelated" in that case
(no v2 needed).
Regards
Robin
As PR112855 mentioned, the VSETVL PASS insert vsetvli in unexpected location.
Due to 2 reasons:
1. incorrect transparant computation LCM data. We need to check VL operand defs
and uses.
2. incorrect fusion of unrelated edge which is the edge never reach the vsetvl
expression.
PR target/
From: Ju-Zhe Zhong
gcc/ChangeLog:
* config/riscv/riscv-vsetvl.cc (pass_vsetvl::compute_probabilities):
Skip exit block.
gcc/testsuite/ChangeLog:
* g++.target/riscv/rvv/base/exception-1.C: New test.
---
gcc/config/riscv/riscv-vsetvl.cc | 10 +--
.../g++.targe