https://gcc.gnu.org/bugzilla/show_bug.cgi?id=126236
--- Comment #12 from GCC Commits <cvs-commit at gcc dot gnu.org> --- The master branch has been updated by Kyrylo Tkachov <[email protected]>: https://gcc.gnu.org/g:bb55bb62fc8a8eabb928653fc38cbe1fde3ab773 commit r17-5808-gbb55bb62fc8a8eabb928653fc38cbe1fde3ab773 Author: Kyrylo Tkachov <[email protected]> Date: Thu Oct 15 20:15:30 2026 +0200 RISC-V: Avoid vsetvl insertion on shared table edges [PR middle-end/126236] Late vsetvl PRE can insert a configuration on an edge from a shared jump-table dispatch. Such an edge cannot be split for one dispatch without also changing the other users of the table. Keep the local configuration in blocks with incoming shared-table edges, using the existing invalid_opt_bb_p check. RISC-V shares jump tables, and without this patch the new test fails with an ICE in rtl_split_edge. With it, the test passes at VLEN 128 and 256. The test also checks that its dispatches share their tables. gcc/ChangeLog: PR middle-end/126236 * config/riscv/riscv-vsetvl.cc (invalid_opt_bb_p): Keep local configurations in blocks with incoming shared-table edges. gcc/testsuite/ChangeLog: PR middle-end/126236 * gcc.target/riscv/rvv/vsetvl/pr126236.c: New test. Signed-off-by: Kyrylo Tkachov <[email protected]>
