https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102703
--- Comment #3 from Aldy Hernandez <aldyh at gcc dot gnu.org> --- This seems to be some limitation of the RTL optimizers in the presence of more aggressive jump threading. Neither the old backward threader nor the old VRP threader could find any threading possibilities: [old code] $ ./cc1 a.c -fdump-tree-all-details -quiet -I/tmp -O3 $ grep threaded a.c.*stati* $ On the other hand, current trunk gets one thread in the backward threader and one in the VRP threader: [trunk] $ grep threaded a.c.*stati* 116 thread "Jumps threaded" "main" 1 202 vrp-thread "Jumps threaded" "main" 1 Now, neither the old code nor the new code can remove the call to foo() in the SSA optimizers. It is the jump_after_combine RTL pass that removes it. Perhaps an RTL expert could opine here.