https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108353
--- Comment #4 from Richard Biener <rguenth at gcc dot gnu.org> ---
Visiting statement:
+j_13 = j_39 + 9;
+
+Match-and-simplified j_39 + 9 to -1420678594
+
+Visiting statement:
if (j_13 <= 2147483628)
Trying to determine truth value of predicate if (j_13 <= 2147483628)
-No interesting values produced.
+
+Conditional will always take edge 7->5
Adding destination of edge (7 -> 5) to worklist
-Adding destination of edge (7 -> 4) to worklist
that's good! but then somehow the iteration causes things to diverge and
eventually
Folding PHI node: i_40 = PHI <i_24(10), i_23(4)>
-Queued PHI for removal. Folds to: i_23
+No folding possible
Folding statement: if (i_40 != 0)
-Folded into: if (1 != 0)
-
+Not folded
we have
Visiting PHI node: i_40 = PHI <i_24(10), i_23(4)>
- Argument #1: i_23 copy-of chain: i_23 [NOT A COPY]
-PHI node i_40 copy-of chain: i_40 -> i_23 [COPY]
+ Argument #1: i_23 copy-of chain: i_23 -> 1 [COPY]
+PHI node i_40 copy-of chain: i_40 -> 1 [COPY]
Telling the propagator to add SSA edges out of this PHI and continue.
...
Visiting PHI node: i_40 = PHI <i_24(10), i_23(4)>
- Argument #0: i_24 copy-of chain: i_24 -> i_23 [COPY]
+ Argument #0: i_24 copy-of chain: i_24 -> 1 [COPY]
Argument #1: i_23 copy-of chain: i_23 [NOT A COPY]
-PHI node i_40 copy-of chain: i_40 -> i_23 [COPY]
-Telling the propagator to do nothing with SSA edges and keep iterating.
+PHI node i_40 copy-of chain: i_40 [NOT A COPY]
+Telling the propagator to add SSA edges out of this PHI and never visit again.
So with having i_24 -> 1 instead of i_23 we eventually make block 9 executable
and i_24 becomes a non-copy.
Iteration order is sub-optimal here.