On 3/29/25 6:49 PM, Vineet Gupta wrote:
changes since v2
- dump log sanfu
---
vsetvl phase4 uses LCM guided info to insert VSETVL insns.
It has an additional loop to insert missing vsetvls on certain edges.
Currently it asserts/aborts on encountering EDGE_ABNORMAL.
When enabling go frontend with V enabled, libgo build hits the assert.
It seems to be safe to just skip the abnormal edge.
Verified that a go toolchain build with the fix completes successfully
and runs the testsuite.
rv64imafdcv_zicbom_zicboz_zicntr_zicond_zicsr_zifencei_zihintntl_zihintpause_zihpm_zfa_zfhmin_zba_zbb_zbs_zkt_zvbb_zvkt/
lp64d/ medlow | 738 / 146 | 7 / 3 | 72 / 12 |
Also to make sure nothing regressed on rvv and go side, did additional 2
sets of runs.
1. RVV build, go disabled, w/ and w/o fix
rv64imafdcv_zvl256b_zba_zbb_zbs_zicond/ lp64d/ medlow | 244 / 96 | 7
/ 3 | 67 / 12 |
rv64imafdcv_zvl256b_zba_zbb_zbs_zicond/ lp64d/ medlow | 244 / 96 | 7
/ 3 | 67 / 12 |
2. go enabled, RVV disabled, w/ and w/o fix
rv64imafdc_zba_zbb_zbs_zicond_zfa/ lp64d/ medlow | 155 / 47 | 0 /
0 | 0 / 0 |
rv64imafdc_zba_zbb_zbs_zicond_zfa/ lp64d/ medlow | 155 / 47 | 0 /
0 | 0 / 0 |
PR target/119533
gcc/ChangeLog:
* config/riscv/riscv-vsetvl.cc (pre_vsetvl::emit_vsetvl): skip
EDGE_ABNORMAL.
gcc/testsuite/ChangeLog:
* go.dg/pr119533-riscv.go: New test.
So presumably it wants to insert on the EH edge for a reason. Just
skipping the edge is probably wrong.
The way these scenarios are handled in the more generic LCM passes is to
kill all values on the EH edge. With all values killed on the EH edge,
no redundancy exists which should require insertion on the edge.
Jeff