https://gcc.gnu.org/bugzilla/show_bug.cgi?id=91017
Bug ID: 91017 Summary: A suspicious code in gcc/tree-vect-stmts.c Product: gcc Version: 10.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: tree-optimization Assignee: unassigned at gcc dot gnu.org Reporter: marxin at gcc dot gnu.org Target Milestone: --- 3486 new_stmt_info 3487 = vect_finish_stmt_generation (stmt_info, call, gsi); 3488 if ((i & 1) == 0) 3489 { 3490 prev_res = half_res; 3491 continue; 3492 } 3493 new_temp = make_ssa_name (vec_dest); 3494 gimple *new_stmt 3495 = gimple_build_assign (new_temp, convert_code, 3496 prev_res, half_res); 3497 new_stmt_info 3498 = vect_finish_stmt_generation (stmt_info, new_stmt, 3499 gsi); 3586 new_stmt_info 3587 = vect_finish_stmt_generation (stmt_info, call, gsi); 3588 if ((j & 1) == 0) 3589 { 3590 prev_res = half_res; 3591 continue; 3592 } 3593 new_temp = make_ssa_name (vec_dest); 3594 gassign *new_stmt = gimple_build_assign (new_temp, convert_code, 3595 prev_res, half_res); 3596 new_stmt_info 3597 = vect_finish_stmt_generation (stmt_info, new_stmt, gsi); Jakub's comment from https://gcc.gnu.org/ml/gcc-patches/2019-06/msg01659.html: There should have been SLP_TREE_VEC_STMTS (slp_node).quick_push (new_stmt_info); in between for slp_node, or the usual code like: if (cond_for_first) STMT_VINFO_VEC_STMT (stmt_info) = *vec_stmt = new_stmt_info; else STMT_VINFO_RELATED_STMT (prev_stmt_info) = new_stmt_info; prev_stmt_info = new_stmt_info; otherwise. In any case, I think this should be dealt with separately.