+2016-05-30 Kugan Vivekanandarajah <kuganv@linaro.org>
+
+ PR middle-end/71252
+ * tree-ssa-reassoc.c (swap_ops_for_binary_stmt): Fix swap such that
+ all fields including stmt_to_insert are swapped.
+
2016-05-30 Jan Hubicka <hubicka@ucw.cz>
* predict.h (force_edge_cold): Declare.
+2016-05-30 Kugan Vivekanandarajah <kuganv@linaro.org>
+
+ PR middle-end/71252
+ * gcc.dg/tree-ssa/pr71252-2.c: New test.
+
2016-05-30 Jan Hubicka <hubicka@ucw.cz>
* gcc.dg/tree-ssa/cunroll-12.c: New testcase.
|| (stmt && is_phi_for_stmt (stmt, oe3->op)
&& !is_phi_for_stmt (stmt, oe1->op)
&& !is_phi_for_stmt (stmt, oe2->op)))
- {
- operand_entry temp = *oe3;
- oe3->op = oe1->op;
- oe3->rank = oe1->rank;
- oe1->op = temp.op;
- oe1->rank= temp.rank;
- }
+ std::swap (*oe1, *oe3);
else if ((oe1->rank == oe3->rank
&& oe2->rank != oe3->rank)
|| (stmt && is_phi_for_stmt (stmt, oe2->op)
&& !is_phi_for_stmt (stmt, oe1->op)
&& !is_phi_for_stmt (stmt, oe3->op)))
- {
- operand_entry temp = *oe2;
- oe2->op = oe1->op;
- oe2->rank = oe1->rank;
- oe1->op = temp.op;
- oe1->rank = temp.rank;
- }
+ std::swap (*oe1, *oe3);
}
/* If definition of RHS1 or RHS2 dominates STMT, return the later of those