+2016-05-31 Richard Biener <rguenther@suse.de>
+
+ PR tree-optimization/71352
+ * tree-ssa-reassoc.c (zero_one_operation): Handle op equal to
+ minus one and a negate.
+
2016-05-31 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
* config/aarch64/aarch64.c (aarch64_simd_attr_length_move): Delete.
+2016-05-31 Richard Biener <rguenther@suse.de>
+
+ PR tree-optimization/71352
+ * gcc.dg/tree-ssa/reassoc-45.c: New testcase.
+
2016-05-31 Thomas Preud'homme <thomas.preudhomme@arm.com>
* gcc.target/arm/armv5_thumb_isa.c: New test.
propagate_op_to_single_use (op, stmt, def);
return;
}
- else if (gimple_assign_rhs_code (stmt) == NEGATE_EXPR
- && gimple_assign_rhs1 (stmt) == op)
+ else if (gimple_assign_rhs_code (stmt) == NEGATE_EXPR)
{
- propagate_op_to_single_use (op, stmt, def);
- return;
+ if (gimple_assign_rhs1 (stmt) == op)
+ {
+ propagate_op_to_single_use (op, stmt, def);
+ return;
+ }
+ else if (integer_minus_onep (op)
+ || real_minus_onep (op))
+ {
+ gimple_assign_set_rhs_code
+ (stmt, TREE_CODE (gimple_assign_rhs1 (stmt)));
+ return;
+ }
}
}
return;
}
else if (is_gimple_assign (stmt2)
- && gimple_assign_rhs_code (stmt2) == NEGATE_EXPR
- && gimple_assign_rhs1 (stmt2) == op)
+ && gimple_assign_rhs_code (stmt2) == NEGATE_EXPR)
{
- propagate_op_to_single_use (op, stmt2, def);
- return;
+ if (gimple_assign_rhs1 (stmt2) == op)
+ {
+ propagate_op_to_single_use (op, stmt2, def);
+ return;
+ }
+ else if (integer_minus_onep (op)
+ || real_minus_onep (op))
+ {
+ gimple_assign_set_rhs_code
+ (stmt2, TREE_CODE (gimple_assign_rhs1 (stmt2)));
+ return;
+ }
}
}