https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94125
--- Comment #13 from CVS Commits <cvs-commit at gcc dot gnu.org> --- The releases/gcc-9 branch has been updated by Bin Cheng <am...@gcc.gnu.org>: https://gcc.gnu.org/g:95c969e58f7905b14d3f2889cf41595eb2c13cbb commit r9-8411-g95c969e58f7905b14d3f2889cf41595eb2c13cbb Author: Bin Cheng <bin.ch...@linux.alibaba.com> Date: Tue Mar 24 17:40:21 2020 +0800 backport PR94125: Update post order number for merged SCC. Function loop_distribution::break_alias_scc_partitions needs to compute SCC with runtime alias edges skipped. As a result, partitions could be re-assigned larger post order number than SCC's precedent partition and distributed before the precedent one. This fixes the issue by updating the merged partition to the minimal post order in SCC. Backport from mainline. PR tree-optimization/94125 * tree-loop-distribution.c (loop_distribution::break_alias_scc_partitions): Update post order number for merged scc. * gcc.dg/tree-ssa/pr94125.c: New test.