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
+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>
* 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>
* gcc.dg/vector-shift.c: New testcase.
--- /dev/null
+/* { 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;
+ }
+}
tree lhs;
if (is_gimple_assign (stmt)
+ && gimple_assign_rhs_code (stmt) == INTEGER_CST
&& (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));
gsi_remove (&gsi, true);