https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88243
Bug ID: 88243
Summary: ice in vect_create_epilog_for_reduction, at
tree-vect-loop.c:4689
Product: gcc
Version: 8.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c
Assignee: unassigned at gcc dot gnu.org
Reporter: dcb314 at hotmail dot com
Target Milestone: ---
For this C code:
int a, b, c;
void d() {
int e, f;
for (; a; a++) {
e = d;
b = 0;
for (; b < 2; b++) {
f = e = e / 2;
c = c + f;
}
}
}
recent gcc trunk with compiler flag -O3 does this:
$ /home/dcb/gcc/results.266550/bin/gcc -c -w -O3 bug486.c
during GIMPLE pass: vect
bug486.c: In function ādā:
bug486.c:3:6: internal compiler error: in vect_create_epilog_for_reduction, at
tree-vect-loop.c:4689
3 | void d() {
| ^
0x6e53e7 vect_create_epilog_for_reduction
../../trunk/gcc/tree-vect-loop.c:4689
0xffd75e vectorizable_reduction(_stmt_vec_info*, gimple_stmt_iterator*,
_stmt_vec_info**, _slp_tree*, _slp_instance*, vec<stmt_info_for_cost, va_heap,
vl_ptr>*)
../../trunk/gcc/tree-vect-loop.c:7129
0xfec95d vect_transform_stmt(_stmt_vec_info*, gimple_stmt_iterator*,
_slp_tree*, _slp_instance*)
../../trunk/gcc/tree-vect-stmts.c:9685
0xfeef26 vect_transform_loop_stmt
../../trunk/gcc/tree-vect-loop.c:8180
The problem seems to start somewhere between revision 266450 and 266500.