+2016-05-25 Richard Biener <rguenther@suse.de>
+
+ PR tree-optimization/71261
+ * tree-if-conv.c (ifcvt_split_def_stmt): Walk uses on the
+ interesting stmt instead of immediate uses when looking
+ for the use operand to replace.
+
2016-05-25 Martin Liska <mliska@suse.cz>
* ipa-inline.c (edge_badness): Use 'w/' instead of 'w'.
+2016-05-25 Richard Biener <rguenther@suse.de>
+
+ PR tree-optimization/71261
+ * c-c++-common/torture/pr71261.c: New testcase.
+
2016-05-25 Richard Biener <rguenther@suse.de>
PR tree-optimization/71264
--- /dev/null
+/* { dg-do compile } */
+/* { dg-additional-options "-mavx2" { target x86_64-*-* i?86-*-* } } */
+
+extern int a, b, c, d, e, f;
+void fn1()
+{
+ for (int g = 0; g < d; g = 1)
+ for (int h = 0; h < 8; h = h + 2)
+ for (int i = h; i < h + 2; i = i + 1)
+ f = a && e || c && b;
+}
gimple *copy_stmt;
gimple_stmt_iterator gsi;
use_operand_p use_p;
- imm_use_iterator imm_iter;
+ ssa_op_iter iter;
var = gimple_assign_lhs (def_stmt);
copy_stmt = gimple_copy (def_stmt);
print_generic_expr (dump_file, lhs, TDF_SLIM);
fprintf (dump_file, "\n");
}
- FOR_EACH_IMM_USE_FAST (use_p, imm_iter, var)
+ FOR_EACH_SSA_USE_OPERAND (use_p, use_stmt, iter, SSA_OP_USE)
{
- if (USE_STMT (use_p) != use_stmt)
+ if (USE_FROM_PTR (use_p) != var)
continue;
SET_USE (use_p, lhs);
break;