Commit 5bb6669d by Jakub Jelinek Committed by Jakub Jelinek

re PR tree-optimization/55831 (ICE: verify_flow_info failed)

	PR tree-optimization/55831
	* tree-vect-loop.c (get_initial_def_for_induction): Use
	gsi_after_labels instead of gsi_start_bb.

	* gcc.dg/pr55831.c: New test.

From-SVN: r194764
parent 8ba3a43e
2013-01-01 Jakub Jelinek <jakub@redhat.com>
PR tree-optimization/55831
* tree-vect-loop.c (get_initial_def_for_induction): Use
gsi_after_labels instead of gsi_start_bb.
2012-12-27 David Edelsohn <dje.gcc@gmail.com> 2012-12-27 David Edelsohn <dje.gcc@gmail.com>
* config/rs6000/rs6000.c (rs6000_deligitimze_address): Do not * config/rs6000/rs6000.c (rs6000_deligitimze_address): Do not
2013-01-01 Jakub Jelinek <jakub@redhat.com>
PR tree-optimization/55831
* gcc.dg/pr55831.c: New test.
2012-12-31 Uros Bizjak <ubizjak@gmail.com> 2012-12-31 Uros Bizjak <ubizjak@gmail.com>
* g++.dg/ipa/devirt-9.C: Cleanup inline ipa dump. * g++.dg/ipa/devirt-9.C: Cleanup inline ipa dump.
......
/* PR tree-optimization/55831 */
/* { dg-do compile } */
/* { dg-options "-O -fstrict-overflow -ftree-vectorize -Wno-unused-label" } */
int g;
short p, q;
void
foo (void)
{
short a = p, b = q, i;
if (a)
{
label:
for (i = 0; i < 8; i++)
b ^= a++;
if (!b)
g = 0;
}
}
void
bar (void)
{
short a = p, b = q, i;
if (a)
{
label:
for (i = 0; i < 8; i++)
b ^= (a = a + 1);
if (!b)
g = 0;
}
}
/* Loop Vectorization /* Loop Vectorization
Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012,
Free Software Foundation, Inc. 2013 Free Software Foundation, Inc.
Contributed by Dorit Naishlos <dorit@il.ibm.com> and Contributed by Dorit Naishlos <dorit@il.ibm.com> and
Ira Rosen <irar@il.ibm.com> Ira Rosen <irar@il.ibm.com>
...@@ -3406,7 +3406,7 @@ get_initial_def_for_induction (gimple iv_phi) ...@@ -3406,7 +3406,7 @@ get_initial_def_for_induction (gimple iv_phi)
build1 (VIEW_CONVERT_EXPR, resvectype, induc_def), NULL_TREE); build1 (VIEW_CONVERT_EXPR, resvectype, induc_def), NULL_TREE);
induc_def = make_ssa_name (gimple_assign_lhs (new_stmt), new_stmt); induc_def = make_ssa_name (gimple_assign_lhs (new_stmt), new_stmt);
gimple_assign_set_lhs (new_stmt, induc_def); gimple_assign_set_lhs (new_stmt, induc_def);
si = gsi_start_bb (bb); si = gsi_after_labels (bb);
gsi_insert_before (&si, new_stmt, GSI_SAME_STMT); gsi_insert_before (&si, new_stmt, GSI_SAME_STMT);
set_vinfo_for_stmt (new_stmt, set_vinfo_for_stmt (new_stmt,
new_stmt_vec_info (new_stmt, loop_vinfo, NULL)); new_stmt_vec_info (new_stmt, loop_vinfo, NULL));
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment