https://gcc.gnu.org/bugzilla/show_bug.cgi?id=117375
--- Comment #7 from qinzhao at gcc dot gnu.org ---
The reason for the ICE is:
The destination of the code movement due to tree sinking might not be the
immediate destination block of the block in which the statement locates.
for example:
B2
/ \
V \
B3 \
/ \ \
V \---->V
B4 B7
A statement in B2 will be sinked to B4, which is not the immediate destination
block of B2, as a result, find_edge (B2,B4) will return NULL.
In order to resolve this issue, we need to find the edge chain from B2 to B4,
i.e, both the edges B2->B3, and B3->B4 are identified. and both the conditions
in B2 and B3 need to be recorded as move_history of the statement.