On 4/9/25 2:53 PM, Vineet Gupta wrote:
Changes since v2 - Elide abnormal edges before LCM not after LCM --- vsetvl phase4 uses LCM guided info to insert VSETVL insns, including a straggler loop for "mising vsetvls" on certain edges. Currently it asserts on encountering EDGE_ABNORMAL. When enabling go frontend with V enabled, libgo build hits the assert. The solution is to filter out abnormal edges from getting into LCM at all. Existing invalid_opt_bb_p () has such checks for BB predecessors but not for successors which is what the patch adds. Crucially, the ICE/fix also depends on avoiding vsetvl hoisting past non-transparent blocks: That is taken care of by Robin's patch "RISC-V: Do not lift up vsetvl into non-transparent blocks [PR119547]" or a different yet related issue. Reported-by: Heinrich Schuchardt <heinrich.schucha...@canonical.com> Signed-off-by: Vineet Gupta <vine...@rivosinc.com> PR target/119533 gcc/ChangeLog: * config/riscv/riscv-vsetvl.cc (invalid_opt_bb_p): Check for EDGE_ABNOMAL. (pre_vsetvl::compute_lcm_local_properties): Dump skipped edge. gcc/testsuite/ChangeLog: * go.dg/pr119533-riscv.go: New test. * go.dg/pr119533-riscv-2.go: New test.
FTR: This was acked in the patch review meeting this morning. Thanks, jeff