https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100981
Richard Biener <rguenth at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |avieira at gcc dot gnu.org --- Comment #2 from Richard Biener <rguenth at gcc dot gnu.org> --- #1 0x0000000001816089 in info_for_reduction (vinfo=0x369bf80, stmt_info=0x376e340) at ../../src/trunk/gcc/tree-vect-loop.c:4897 4897 gcc_assert (STMT_VINFO_REDUC_DEF (stmt_info)); (gdb) p debug_gimple_stmt ($1) slp_patt_96 = .COMPLEX_FMA (dsdotr.5_21, dsdotr.5_21, dsdotr.5_21); $2 = void ah, so we get a reduction stmt SLP pattern-recognized... and while the original scalar stmt_infos are preserved: t.f90:9:8: note: node 0x35cff60 (max_nunits=4, refcnt=2) t.f90:9:8: note: op template: slp_patt_96 = .COMPLEX_FMA (dsdotr.5_21, dsdotr.5_21, dsdotr.5_21); t.f90:9:8: note: stmt 0 dsdotr.5_21 = dsdotr.5_20 + _36; t.f90:9:8: note: stmt 1 dsdoti.4_19 = dsdoti.4_18 + _37; t.f90:9:8: note: children 0x35cffe8 0x35d0648 0x35d0290 the reduc-info, which is originally attached to the SLP nodes representative is no longer there (it didn't get transfered). Now, actually handling this needs some double-checking and turning the testcase into a runtime one. I'll poke on doing that. The issue is probably latent on the branch where we might want to play safer and simply refuse to pattern recog nodes with a STMT_VINFO_REDUC_DEF (vect_orig_stmt (SLP_TREE_REPRESENTATIVE (node))).