https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79621
Jeffrey A. Law <law at redhat dot com> changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords|ice-on-valid-code |missed-optimization Summary|[7 Regression] ICE in |Missed path isolation |operator[], at vec.h:732 |opportunity --- Comment #5 from Jeffrey A. Law <law at redhat dot com> --- ;; basic block 4, loop depth 1, count 0, freq 7500, maybe hot ;; Invalid sum of incoming frequencies 11023, should be 7500 ;; prev block 3, next block 5, flags: (NEW, REACHABLE, IRREDUCIBLE_LOOP, VISITED) ;; pred: 3 [100.0%] (FALLTHRU) ;; 5 [5.9%] (FALSE_VALUE,EXECUTABLE) ;; 4 [75.0%] (DFS_BACK,IRREDUCIBLE_LOOP,TRUE_VALUE,EXECUTABLE) ;; 6 [85.0%] (DFS_BACK,TRUE_VALUE,EXECUTABLE) # gv_20 = PHI <1(3), 1(5), gv_16(4), 1(6)> # e7_11 = PHI <e7_13(D)(3), e7_13(D)(5), e7_11(4), 0(6)> b5.2_2 = b5; _3 = b5.2_2 / e7_11; b5 = _3; gv_16 = gv_20 + 1; if (gv_16 != 4) goto <bb 4>; [75.00%] else goto <bb 6>; [25.00%] We fail to isolate the path 6->4 which would result in a division by zero. This is due to the 4->4 edge and the fact that duplication of bb4 could expand the phis at the start of bb4 (causing them to move and we'd have dangling references to them in gimple-ssa-isolate-paths.c. Note that isolation of 6->4 should expose the PHI as a degenerate, allowing for the propagation of e7_13 for e7_11.