--- /dev/null
+/* { dg-do compile } */
+/* PR tree-optimization/125419 */
+
+signed g13, g29, g27, g26, g17;
+void f2(void)__attribute__((returns_twice));
+void f1(bool c14)
+{
+ int sj15;
+ if (c14) sj15 = sj15;
+ f2();
+ c14 = 0;
+ do {
+ int c11 = g27;
+ if (c11) goto lbl_br22;
+ goto lbl_br24;
+lbl_br22:
+ c14 = sj15;
+ c11 = g29 = g13;
+ if (c11) goto lbl_br22;
+lbl_br24:
+ g26 = g17;
+ } while (c14);
+}
if (!gimple_extract_op (arg0_def_stmt, &arg0_op))
return;
- /* At this point there should be no ssa names occuring in abnormals. */
- gcc_assert (!arg0_op.operands_occurs_in_abnormal_phi ());
+ /* Might pick up abnormals from previous bbs so stop the loop. */
+ if (arg0_op.operands_occurs_in_abnormal_phi ())
+ return;
gimple *arg1_def_stmt = SSA_NAME_DEF_STMT (*arg1);
if (!gimple_extract_op (arg1_def_stmt, &arg1_op))
return;
- /* At this point there should be no ssa names occuring in abnormals. */
- gcc_assert (!arg1_op.operands_occurs_in_abnormal_phi ());
+ /* Might pick up abnormals from previous bbs so stop the loop. */
+ if (arg1_op.operands_occurs_in_abnormal_phi ())
+ return;
/* No factoring can happen if the codes are different
or the number operands. */