https://gcc.gnu.org/bugzilla/show_bug.cgi?id=123870
--- Comment #19 from Robin Dapp <rdapp at gcc dot gnu.org> --- (In reply to Ilya Kurdyukov from comment #18) > I tried to find out what exactly in -O2 is causing the problem. > > It seems to be in instruction scheduling: > > -O2 : wrong result > -O1 : correct > > -O1 -fschedule-insns : wrong result > -O2 -fno-schedule-insns : correct > -O3 -fno-schedule-insns : correct Interesting, that's a good find and maybe can help me debug even without hardware. Would you mind trying --param=riscv-vsetvl-strategy=simple?
