[Bug tree-optimization/50133] [4.7 Regression] ICE: SIGSEGV in vect_finish_stmt_generation (gimple.h:4821) with -ftree-vectorize -fno-tree-loop-im
irar at il dot ibm.com
gcc-bugzilla@gcc.gnu.org
Sun Aug 21 07:56:00 GMT 2011
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50133
Ira Rosen <irar at il dot ibm.com> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |irar at il dot ibm.com
--- Comment #1 from Ira Rosen <irar at il dot ibm.com> 2011-08-21 06:02:10 UTC ---
When creating a vector from an invariant scalar load, we do
gsi_next (&gsi2);
in order to insert the vector after the load. In this testcase the load is the
last stmt in its basic block, which causes the failure when we try to call
gsi_stmt().
This patch fixes the failure:
Index: tree-vect-stmts.c
===================================================================
--- tree-vect-stmts.c (revision 177929)
+++ tree-vect-stmts.c (working copy)
@@ -1435,6 +1435,9 @@ vect_finish_stmt_generation (gimple stmt, gimple v
}
si = *gsi;
+ if (gsi_end_p (si))
+ si = gsi_for_stmt (stmt);
+
if (is_gimple_debug (gsi_stmt (si)))
{
gsi_next_nondebug (&si);
but it's a hack.
We could add a new parameter insert_after to vect_finish_stmt_generation (), to
indicate that VECT_STMT should be inserted after GSI and not before. For this
case we would have to pass it to vect_init_vector() first.
Ira
More information about the Gcc-bugs
mailing list