gsi_next (&gsi))
{
gphi *phi = gsi.phi ();
- if (!virtual_operand_p (gimple_phi_result (phi)))
- {
- tree arg = PHI_ARG_DEF_FROM_EDGE (phi, e);
- vec->safe_push (std::make_pair (phi, arg));
- }
+ tree arg = PHI_ARG_DEF_FROM_EDGE (phi, e);
+ vec->safe_push (std::make_pair (phi, arg));
}
}
0, /* properties_provided */
0, /* properties_destroyed */
0, /* todo_flags_start */
- TODO_cleanup_cfg | TODO_update_ssa /* todo_flags_finish */
+ TODO_update_ssa /* todo_flags_finish */
};
class pass_if_to_switch : public gimple_opt_pass
if (!all_candidates.is_empty ())
{
free_dominance_info (CDI_DOMINATORS);
- mark_virtual_operands_for_renaming (fun);
+ return TODO_cleanup_cfg;
}
return 0;
--- /dev/null
+/* PR tree-optimization/98455 */
+/* { dg-do compile } */
+/* { dg-options "-O1 -fno-tree-dce --param case-values-threshold=1" } */
+
+void
+n4 (int io, int vb)
+{
+ double uc[2] = { 1.0, 2.0, };
+
+ if (io == 0)
+ uc[0] = 0.0;
+
+ for (;;)
+ if (io == 0)
+ if (vb == 0)
+ uc[0] = uc[1];
+ else if (vb == 1)
+ uc[1] = 0.0;
+}