https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103264
--- Comment #2 from Jan Hubicka <hubicka at gcc dot gnu.org> --- OK, the test wants to verify that main() became single basic block that has correct frequency. This is still true. What we get wrong is that the function t() gets mismatches: int t () { int i; int _7; int _10; int _13; ;; basic block 2, loop depth 0, count 312727306 (estimated locally, globally 0), probably never executed ;; prev block 0, next block 3, flags: (NEW, REACHABLE, VISITED) ;; pred: ENTRY [always] count:312727306 (estimated locally, globally 0) (FALLTHRU,EXECUTABLE) _7 = a[0]; if (_7 != 0) goto <bb 6>; [5.50%] else goto <bb 3>; [94.50%] ;; succ: 6 [5.5% (guessed)] count:17200002 (estimated locally, globally 0) (TRUE_VALUE,EXECUTABLE) ;; 3 [94.5% (guessed)] count:295527304 (estimated locally, globally 0) (FALSE_VALUE,EXECUTABLE) ;; basic block 3, loop depth 0, count 299827304 (estimated locally, globally 0), probably never executed ;; Invalid sum of incoming counts 295527304 (estimated locally, globally 0), should be 299827304 (estimated locally, globally 0) ;; prev block 2, next block 4, flags: (NEW, REACHABLE, VISITED) ;; pred: 2 [94.5% (guessed)] count:295527304 (estimated locally, globally 0) (FALSE_VALUE,EXECUTABLE) _10 = a[1]; if (_10 != 0) goto <bb 6>; [5.50%] else goto <bb 4>; [94.50%] ;; succ: 6 [5.5% (guessed)] count:16490502 (estimated locally, globally 0) (TRUE_VALUE,EXECUTABLE) ;; 4 [94.5% (guessed)] count:283336802 (estimated locally, globally 0) (FALSE_VALUE,EXECUTABLE) ;; basic block 4, loop depth 0, count 287459432 (estimated locally, globally 0), probably never executed ;; Invalid sum of incoming counts 283336802 (estimated locally, globally 0), should be 287459432 (estimated locally, globally 0) ;; prev block 3, next block 5, flags: (NEW, REACHABLE, VISITED) ;; pred: 3 [94.5% (guessed)] count:283336802 (estimated locally, globally 0) (FALSE_VALUE,EXECUTABLE) _13 = a[2]; if (_13 != 0) goto <bb 6>; [5.50%] else goto <bb 5>; [94.50%] ;; succ: 6 [5.5% (guessed)] count:15810269 (estimated locally, globally 0) (TRUE_VALUE,EXECUTABLE) ;; 5 [94.5% (guessed)] count:271649163 (estimated locally, globally 0) (FALSE_VALUE,EXECUTABLE) ;; basic block 5, loop depth 0, count 271649163 (estimated locally, globally 0), probably never executed ;; prev block 4, next block 6, flags: (NEW) ;; pred: 4 [94.5% (guessed)] count:271649163 (estimated locally, globally 0) (FALSE_VALUE,EXECUTABLE) ;; succ: 6 [always] count:271649163 (estimated locally, globally 0) (FALLTHRU) ;; basic block 6, loop depth 0, count 312727306 (estimated locally, globally 0), probably never executed ;; Invalid sum of incoming counts 321149936 (estimated locally, globally 0), should be 312727306 (estimated locally, globally 0) ;; prev block 5, next block 1, flags: (NEW, REACHABLE, VISITED) ;; pred: 3 [5.5% (guessed)] count:16490502 (estimated locally, globally 0) (TRUE_VALUE,EXECUTABLE) ;; 5 [always] count:271649163 (estimated locally, globally 0) (FALLTHRU) ;; 4 [5.5% (guessed)] count:15810269 (estimated locally, globally 0) (TRUE_VALUE,EXECUTABLE) ;; 2 [5.5% (guessed)] count:17200002 (estimated locally, globally 0) (TRUE_VALUE,EXECUTABLE) # i_5 = PHI <1(3), 3(5), 2(4), 0(2)> return i_5; ;; succ: EXIT [always] count:312727306 (estimated locally, globally 0) } which appears in cunrolli. I don't think this is related to the modref change. Martin, can you please bisect it?