On 10/28/26 1:19 AM, Richard Biener wrote:
On Wed, Oct 28, 2026 at 7:16 AM Sendao Yan <[email protected]> wrote:
The backward jump threader fails to thread the state-machine loop in
binascii_a2b_base64 because the switch has already been lowered to a
decision tree by the time the late FSM threading runs, and the
duplication limits are tight for the resulting branch sequence.

Lower the switch after the second pass_thread_jumps_full so the backward
threader still sees the GIMPLE_SWITCH, but before pass_dominator so the
lowered decision tree is cleaned up by the following jump threading.
pass_dominator and pass_strlen keep their places and the non-FSM
pass_thread_jumps moves after them, restoring the GCC 11 performance
(PR128102) without introducing a -Wmaybe-uninitialized false positive.

The reordering also removes a pre-existing false positive in
uninit-pred-7_a.c.
LGTM (I assume bootstrapped and tested on a primary arch).
My bootstrap test on x86 showed:

gcc: gcc.dg/tree-ssa/pr21417.c scan-tree-dump-times thread2 "jump thread" 1
gcc: gcc.dg/tree-ssa/pr21417.c scan-tree-dump-times thread2 "jump thread" 1
gcc: gcc.dg/tree-ssa/pr71437.c scan-tree-dump-times dom3 "Threaded jump " 2
gcc: gcc.dg/tree-ssa/pr71437.c scan-tree-dump-times dom3 "Threaded jump " 2
gcc: gcc.dg/tree-ssa/pr77445.c scan-tree-dump-times thread2 "Registering jump thread" 2 gcc: gcc.dg/tree-ssa/pr77445.c scan-tree-dump-times thread2 "Registering jump thread" 2 gcc: gcc.dg/tree-ssa/ssa-dom-thread-2b.c scan-tree-dump-times thread2 "Jumps threaded: 1" 1 gcc: gcc.dg/tree-ssa/ssa-dom-thread-2b.c scan-tree-dump-times thread2 "Jumps threaded: 1" 1 gcc: gcc.dg/tree-ssa/ssa-dom-thread-7.c scan-tree-dump thread2 "Jumps threaded: 12" gcc: gcc.dg/tree-ssa/ssa-dom-thread-7.c scan-tree-dump thread2 "Jumps threaded: 12" gcc: gcc.dg/tree-ssa/ssa-thread-24.c scan-tree-dump thread2 "Jumps threaded: 1" gcc: gcc.dg/tree-ssa/ssa-thread-24.c scan-tree-dump thread2 "Jumps threaded: 1"

These may be trivial to fix, I haven't really looked at them.  So I think Sendao needs to get x86 or aarch64 clean, then we'll retest -- most of the embedded targets are red indicating a testing regression and spot checking shows the same set of fails.  Happy to retest once one of those targets is clean.

jeff

Reply via email to