https://gcc.gnu.org/bugzilla/show_bug.cgi?id=84090
Bug ID: 84090 Summary: [8 Regression] ICE in gimple_redirect_edge_and_branch, at tree-cfg.c:6151 Product: gcc Version: 8.0 Status: UNCONFIRMED Keywords: ice-on-valid-code Severity: normal Priority: P3 Component: tree-optimization Assignee: unassigned at gcc dot gnu.org Reporter: asolokha at gmx dot com Target Milestone: --- Target: powerpc-*-linux-gnu, powerpcspe-*-linux-gnu gcc-8.0.0-alpha20180121 snapshot (r256935) ICEs when compiling the following snippet w/ -mcpu=power9 (7400, 7450, 970, G4, G5, cell, e6500, power7, power8, powerpc64le) -O1 -ftrapv -ftree-loop-vectorize: void dn (int uk, int gz) { while (uk < 1) if (gz != 0) { short int pp; for (pp = 0; pp < 1; ++pp) { e6: gz += pp; } } goto e6; } % powerpc-e300c3-linux-gnu-gcc-8.0.0-alpha20180121 -mcpu=power9 -O1 -ftrapv -ftree-loop-vectorize -c de5zx0pd.c during GIMPLE pass: vect de5zx0pd.c: In function 'dn': de5zx0pd.c:2:1: internal compiler error: in gimple_redirect_edge_and_branch, at tree-cfg.c:6151 dn (int uk, int gz) ^~ 0xc9ee71 gimple_redirect_edge_and_branch /var/tmp/portage/cross-powerpc-e300c3-linux-gnu/gcc-8.0.0_alpha20180121/work/gcc-8-20180121/gcc/tree-cfg.c:6151 0x727708 redirect_edge_and_branch(edge_def*, basic_block_def*) /var/tmp/portage/cross-powerpc-e300c3-linux-gnu/gcc-8.0.0_alpha20180121/work/gcc-8-20180121/gcc/cfghooks.c:369 0xc92d70 gimple_split_edge /var/tmp/portage/cross-powerpc-e300c3-linux-gnu/gcc-8.0.0_alpha20180121/work/gcc-8-20180121/gcc/tree-cfg.c:2964 0x728043 split_edge(edge_def*) /var/tmp/portage/cross-powerpc-e300c3-linux-gnu/gcc-8.0.0_alpha20180121/work/gcc-8-20180121/gcc/cfghooks.c:648 0x90555e gimple_find_edge_insert_loc /var/tmp/portage/cross-powerpc-e300c3-linux-gnu/gcc-8.0.0_alpha20180121/work/gcc-8-20180121/gcc/gimple-iterator.c:811 0x9068bb gsi_insert_seq_on_edge_immediate(edge_def*, gimple*) /var/tmp/portage/cross-powerpc-e300c3-linux-gnu/gcc-8.0.0_alpha20180121/work/gcc-8-20180121/gcc/gimple-iterator.c:855 0xf1a261 vectorizable_live_operation(gimple*, gimple_stmt_iterator*, _slp_tree*, int, gimple**) /var/tmp/portage/cross-powerpc-e300c3-linux-gnu/gcc-8.0.0_alpha20180121/work/gcc-8-20180121/gcc/tree-vect-loop.c:8311 0xf11f27 vect_transform_stmt(gimple*, gimple_stmt_iterator*, bool*, _slp_tree*, _slp_instance*) /var/tmp/portage/cross-powerpc-e300c3-linux-gnu/gcc-8.0.0_alpha20180121/work/gcc-8-20180121/gcc/tree-vect-stmts.c:9561 0xf220ef vect_transform_loop(_loop_vec_info*) /var/tmp/portage/cross-powerpc-e300c3-linux-gnu/gcc-8.0.0_alpha20180121/work/gcc-8-20180121/gcc/tree-vect-loop.c:8870 0xf442da vectorize_loops() /var/tmp/portage/cross-powerpc-e300c3-linux-gnu/gcc-8.0.0_alpha20180121/work/gcc-8-20180121/gcc/tree-vectorizer.c:740