On Tue, Oct 27, 2026 at 5:24 PM Richard Biener <[email protected]> wrote: > Would it help moving threadfull slightly earlier, replacing thread_jumps > before > pass_dominator with the switch lowering right after that, so > NEXT_PASS (pass_thread_jumps_full, /*first=*/false); > NEXT_PASS (pass_lower_switch); > NEXT_PASS (pass_dominator, false /* may_peel_loop_headers_p */); > NEXT_PASS (pass_strlen); > NEXT_PASS (pass_thread_jumps, /*first=*/false); > where DOM and strlen keep their old places? What you'd gain is DOM > after switch lowering (but not reassoc or FRE).
Yes, that's much cleaner. I tried exactly this reorder. threadfull2 still sees the GIMPLE_SWITCH and threads the loop, dropping the benchmark from 4.10 cycles/byte on trunk to ~2.3 cycles/byte at -O2 and -O3, back to the GCC 11 level, and because DOM now runs after pass_lower_switch it folds the unreachable default branch of the nested switch, so uninit-pr44547.c no longer emits the -Wmaybe-uninitialized false positive. The full uninit-* testsuite is clean. The reorder even fixes the bogus warning in uninit-pred-7_a.c (foo's 'if (n)' case), whose xfail is no longer needed, so I've updated that test. I'll drop the ranger-based uninit patch (2/2) and send v2 with just the pass reorder plus the test update. Sendao
