Commit 9ff09a22 by Richard Biener Committed by Richard Biener

re PR tree-optimization/57214 (ice: tree check: expected ssa_name, have…

re PR tree-optimization/57214 (ice: tree check: expected ssa_name, have integer_cst in coalesce_partitions, at tree-ssa-coalesce.c:1194)

2013-05-10  Richard Biener  <rguenther@suse.de>

	PR tree-optimization/57214
	* tree-ssa-loop-ivcanon.c (propagate_constants_for_unrolling): Do
	not propagate from SSA names that occur in abnormal PHI nodes.

From-SVN: r198773
parent a5e0cd1d
2013-05-10 Richard Biener <rguenther@suse.de>
PR tree-optimization/57214
* tree-ssa-loop-ivcanon.c (propagate_constants_for_unrolling): Do
not propagate from SSA names that occur in abnormal PHI nodes.
2013-05-10 Marc Glisse <marc.glisse@inria.fr> 2013-05-10 Marc Glisse <marc.glisse@inria.fr>
* stor-layout.c (element_precision): New function. * stor-layout.c (element_precision): New function.
......
2013-05-10 Richard Biener <rguenther@suse.de>
PR tree-optimization/57214
* tree-ssa-loop-ivcanon.c (propagate_constants_for_unrolling): Do
not propagate from SSA names that occur in abnormal PHI nodes.
2013-05-10 Marc Glisse <marc.glisse@inria.fr> 2013-05-10 Marc Glisse <marc.glisse@inria.fr>
* gcc.dg/vector-shift.c: New testcase. * gcc.dg/vector-shift.c: New testcase.
......
/* { dg-do compile } */
extern int baz (void);
extern int foo (void) __attribute__ ((returns_twice));
void
bar (_Bool b)
{
int buf[1];
while (1)
{
_Bool x = 1;
if (b)
baz ();
b = 1;
baz ();
x = 0;
int i;
while (buf[i] && i)
i++;
foo ();
if (!x)
b = 0;
}
}
...@@ -1085,8 +1085,9 @@ propagate_constants_for_unrolling (basic_block bb) ...@@ -1085,8 +1085,9 @@ propagate_constants_for_unrolling (basic_block bb)
tree lhs; tree lhs;
if (is_gimple_assign (stmt) if (is_gimple_assign (stmt)
&& gimple_assign_rhs_code (stmt) == INTEGER_CST
&& (lhs = gimple_assign_lhs (stmt), TREE_CODE (lhs) == SSA_NAME) && (lhs = gimple_assign_lhs (stmt), TREE_CODE (lhs) == SSA_NAME)
&& gimple_assign_rhs_code (stmt) == INTEGER_CST) && !SSA_NAME_OCCURS_IN_ABNORMAL_PHI (lhs))
{ {
propagate_into_all_uses (lhs, gimple_assign_rhs1 (stmt)); propagate_into_all_uses (lhs, gimple_assign_rhs1 (stmt));
gsi_remove (&gsi, true); gsi_remove (&gsi, true);
......
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