PR rtl-optimization/46183
* gcse.c (execute_rtl_cprop): Cleanup the CFG if something changed.
(execute_rtl_pre): Likewise.
(execute_rtl_hoist): Likewise.
* gcc.dg/torture/pr46183.c: New testcase.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@166316
138bc75d-0d04-0410-961f-
82ee72b054a4
2010-11-04 Richard Guenther <rguenther@suse.de>
+ PR rtl-optimization/46183
+ * gcse.c (execute_rtl_cprop): Cleanup the CFG if something changed.
+ (execute_rtl_pre): Likewise.
+ (execute_rtl_hoist): Likewise.
+
+2010-11-04 Richard Guenther <rguenther@suse.de>
+
PR tree-optimization/46068
* ipa-split.c (consider_split): Remove gcc_unreachable.
static unsigned int
execute_rtl_cprop (void)
{
+ int changed;
delete_unreachable_blocks ();
df_set_flags (DF_LR_RUN_DCE);
df_analyze ();
- flag_rerun_cse_after_global_opts |= one_cprop_pass ();
+ changed = one_cprop_pass ();
+ flag_rerun_cse_after_global_opts |= changed;
+ if (changed)
+ cleanup_cfg (0);
return 0;
}
static unsigned int
execute_rtl_pre (void)
{
+ int changed;
delete_unreachable_blocks ();
df_analyze ();
- flag_rerun_cse_after_global_opts |= one_pre_gcse_pass ();
+ changed = one_pre_gcse_pass ();
+ flag_rerun_cse_after_global_opts |= changed;
+ if (changed)
+ cleanup_cfg (0);
return 0;
}
static unsigned int
execute_rtl_hoist (void)
{
+ int changed;
delete_unreachable_blocks ();
df_analyze ();
- flag_rerun_cse_after_global_opts |= one_code_hoisting_pass ();
+ changed = one_code_hoisting_pass ();
+ flag_rerun_cse_after_global_opts |= changed;
+ if (changed)
+ cleanup_cfg (0);
return 0;
}
2010-11-04 Richard Guenther <rguenther@suse.de>
+ PR rtl-optimization/46183
+ * gcc.dg/torture/pr46183.c: New testcase.
+
+2010-11-04 Richard Guenther <rguenther@suse.de>
+
PR tree-optimization/46068
* gcc.dg/torture/pr46068.c: New testcase.
--- /dev/null
+/* { dg-do compile } */
+/* { dg-options "-fno-dse" } */
+
+void bar(void);
+
+void foo (int i, ...)
+{
+ __builtin_va_list ap;
+ __builtin_va_start (ap, i);
+ __builtin_va_arg (ap, int);
+ while (i) i++;
+ __builtin_va_arg (ap, int);
+ while (i) i++;
+ __builtin_va_arg (ap, int);
+ while (i) i++;
+ __builtin_va_arg (ap, int);
+ if (i)
+ bar ();
+}
+