+2016-06-07 Kugan Vivekanandarajah <kuganv@linaro.org>
+
+ PR middle-end/71408
+ * tree-ssa-reassoc.c (zero_one_operation): Fix NEGATE_EXPR operand for
+ propagate_op_to_single_use.
+
2016-06-07 Kugan Vivekanandarajah <kuganv@linaro.org>
PR middle-end/71281
+2016-06-07 Kugan Vivekanandarajah <kuganv@linaro.org>
+
+ PR middle-end/71408
+ * gcc.dg/tree-ssa/pr71408.c: New test.
+
2016-06-07 Kugan Vivekanandarajah <kuganv@linaro.org>
PR middle-end/71281
--- /dev/null
+/* PR middle-end/71408 */
+/* { dg-do run } */
+/* { dg-options "-Os" } */
+unsigned a, b;
+
+struct S0
+{
+ int f1:18;
+ unsigned f3:4;
+};
+
+void fn1 ()
+{
+ struct S0 c = { 7, 0 };
+ if (c.f1)
+ c.f3 = 3;
+ a = -~c.f3;
+ c.f3 = ~(c.f1 && c.f1);
+ c.f1 = c.f3 * (c.f1 - (c.f1 - a % c.f1)) + ~c.f3 * -a;
+ b = ~(c.f1 & a);
+ if (b >= 4294967295)
+ __builtin_abort ();
+}
+
+int
+main ()
+{
+ fn1 ();
+ return 0;
+}
{
if (gimple_assign_rhs1 (stmt) == op)
{
- propagate_op_to_single_use (op, stmt, def);
+ tree cst = build_minus_one_cst (TREE_TYPE (op));
+ propagate_op_to_single_use (cst, stmt, def);
return;
}
else if (integer_minus_onep (op)
{
if (gimple_assign_rhs1 (stmt2) == op)
{
- propagate_op_to_single_use (op, stmt2, def);
+ tree cst = build_minus_one_cst (TREE_TYPE (op));
+ propagate_op_to_single_use (cst, stmt2, def);
return;
}
else if (integer_minus_onep (op)