https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71185
--- Comment #5 from Richard Biener <rguenth at gcc dot gnu.org> --- Index: gcc/tree-ssa-loop-prefetch.c =================================================================== --- gcc/tree-ssa-loop-prefetch.c (revision 236442) +++ gcc/tree-ssa-loop-prefetch.c (working copy) @@ -631,6 +631,9 @@ gather_memory_references (struct loop *l continue; } + if (! gimple_vuse (stmt)) + continue; + lhs = gimple_assign_lhs (stmt); rhs = gimple_assign_rhs1 (stmt); should fix it.