https://gcc.gnu.org/bugzilla/show_bug.cgi?id=93397
prathamesh3492 at gcc dot gnu.org changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |prathamesh3492 at gcc dot gnu.org --- Comment #1 from prathamesh3492 at gcc dot gnu.org --- Seems to ICE at all optimization levels. Because slp_node is NULL in following hunk in vect_create_epilog_for_reduction since we're calling it from loop vectorizer: /* In SLP reduction chain we reduce vector results into one vector if necessary, hence we set here REDUC_GROUP_SIZE to 1. SCALAR_DEST is the LHS of the last stmt in the reduction chain, since we are looking for the loop exit phi node. */ if (REDUC_GROUP_FIRST_ELEMENT (stmt_info)) { stmt_vec_info t = SLP_TREE_SCALAR_STMTS (slp_node)[group_size - 1]; Gating the condition on slp_node seems to work, but not sure if that's the right fix ? Thanks, Prathamesh