gimple ISEL: fix BB stmt iteration
authorMartin Liska <mliska@suse.cz>
Mon, 30 Nov 2020 10:10:28 +0000 (11:10 +0100)
committerMartin Liska <mliska@suse.cz>
Mon, 30 Nov 2020 11:57:31 +0000 (12:57 +0100)
gcc/ChangeLog:

PR tree-optimization/98066
* gimple-isel.cc (gimple_expand_vec_exprs): Return when
gimple_expand_vec_exprs replaces last stmt.

gcc/gimple-isel.cc

index 048b407bd11b508379230b4990f57fd8d8020a55..d79c212748fb1fbd94330b88f169edf7e8233200 100644 (file)
@@ -273,6 +273,8 @@ gimple_expand_vec_exprs (void)
            }
 
          gimple_expand_vec_set_expr (&gsi);
+         if (gsi_end_p (gsi))
+           break;
        }
     }