------- Comment #4 from pinskia at gcc dot gnu dot org 2005-12-03 17:01 ------- This looks very much related to PR 21829.
Hmm, in 4.0.0 we got Before DOM (likewise for 4.1.0 and above): <L1>:; i_2 = i_10 + 1; if (i_2 != 4) goto <L0>; else goto <L3>; # i_7 = PHI <i_2(2)>; <L3>:; if (i_7 == 4) goto <L4>; else goto <L5>; but after: <L1>:; i_2 = i_10 + 1; if (i_2 != 4) goto <L0>; else goto <L3>; Invalid sum of incoming frequencies 2375, should be 0 # i_7 = PHI <i_2(2)>; <L3>:; foo (r_3); Which means that GCC got it right in 4.0.0 -- pinskia at gcc dot gnu dot org changed: What |Removed |Added ---------------------------------------------------------------------------- BugsThisDependsOn| |21829 Known to fail| |4.1.0 4.2.0 Known to work| |4.0.0 4.0.2 Summary|Jump threading opportunity |[4.1/4.2 Regression] Jump |missed in tree-ssa but |threading opportunity missed |caught in jump1 |in tree-ssa but caught in | |jump1 Target Milestone|--- |4.2.0 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=25243