https://gcc.gnu.org/bugzilla/show_bug.cgi?id=93264
Bug ID: 93264 Summary: [10 Regression] ICE in cfg_layout_redirect_edge_and_branch_force, at cfgrtl.c:4522 Product: gcc Version: 10.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: rtl-optimization Assignee: unassigned at gcc dot gnu.org Reporter: zhroma at gcc dot gnu.org Blocks: 90040 Target Milestone: --- Opening bug 90040 comment 2 as a separate regression PR to achieve more attention to the issue. As modulo-scheduler maintainer I cannot solve it, issue happens early in the pass when loop_optimizer_init is called after bbro finished its job. There are much more discussion in the meta-bug itself (PR90040). Although I'm pretty sure this was latent before, technically, since r10-4447 we have a regression (ICE on valid code): $ aarch64-unknown-linux-gnueabi-gcc -O3 -fomit-frame-pointer -funroll-loops -fpeel-loops -ftracer -finline-functions -fmodulo-sched -freorder-blocks-and-partition -S gcc/testsuite/gcc.c-torture/execute/pr71550.c gcc/testsuite/gcc.c-torture/execute/pr71550.c: In function 'main': gcc/testsuite/gcc.c-torture/execute/pr71550.c:26:1: internal compiler error: in cfg_layout_redirect_edge_and_branch_force, at cfgrtl.c:4522 26 | } | ^ 0xb4a9d9 cfg_layout_redirect_edge_and_branch_force /mnt/scratch/zhroma/gcc/src/master/gcc/cfgrtl.c:4522 0xb2e57d redirect_edge_and_branch_force(edge_def*, basic_block_def*) /mnt/scratch/zhroma/gcc/src/master/gcc/cfghooks.c:490 0xb2f2fe make_forwarder_block(basic_block_def*, bool (*)(edge_def*), void (*)(basic_block_def*)) /mnt/scratch/zhroma/gcc/src/master/gcc/cfghooks.c:897 0xb33214 merge_latch_edges /mnt/scratch/zhroma/gcc/src/master/gcc/cfgloop.c:780 0xb33314 disambiguate_multiple_latches /mnt/scratch/zhroma/gcc/src/master/gcc/cfgloop.c:831 0xb3335d disambiguate_loops_with_multiple_latches() /mnt/scratch/zhroma/gcc/src/master/gcc/cfgloop.c:844 0xf1d3d0 apply_loop_flags /mnt/scratch/zhroma/gcc/src/master/gcc/loop-init.c:54 0xf1d539 loop_optimizer_init(unsigned int) /mnt/scratch/zhroma/gcc/src/master/gcc/loop-init.c:123 0x1f339f6 sms_schedule /mnt/scratch/zhroma/gcc/src/master/gcc/modulo-sched.c:1350 0x1f38a16 execute /mnt/scratch/zhroma/gcc/src/master/gcc/modulo-sched.c:3341 Referenced Bugs: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=90040 [Bug 90040] [meta-bug] modulo-scheduler and partitioning issues