https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80341
--- Comment #10 from Richard Biener <rguenth at gcc dot gnu.org> --- Author: rguenth Date: Thu Jun 22 07:30:03 2017 New Revision: 249499 URL: https://gcc.gnu.org/viewcvs?rev=249499&root=gcc&view=rev Log: 2017-06-22 Richard Biener <rguent...@suse.de> Backport from mainline 2017-04-20 Richard Biener <rguent...@suse.de> PR tree-optimization/80453 * tree-ssa-sccvn.h (struct vn_phi_s): Add cclhs and ccrhs members. * tree-ssa-sccvn.c (cond_stmts_equal_p): Use recorded lhs and rhs from the conditions. (vn_phi_eq): Pass them down. (vn_phi_lookup): Record them. (vn_phi_insert): Likewise. 2017-04-07 Richard Biener <rguent...@suse.de> PR middle-end/80341 * tree.c (get_unwidened): Also handle ! for_type case for INTEGER_CSTs. * convert.c (do_narrow): Split out from ... (convert_to_integer_1): ... here. Do not pass final truncation type to get_unwidened for TRUNC_DIV_EXPR. * gcc.dg/torture/pr80341.c: New testcase. 2017-04-04 Richard Biener <rguent...@suse.de> PR middle-end/80281 * match.pd (A + (-B) -> A - B): Make sure to preserve unsigned arithmetic done for the negate or the plus. Simplify. (A - (-B) -> A + B): Likewise. * fold-const.c (split_tree): Make sure to not negate pointers. * gcc.dg/torture/pr80281.c: New testcase. Modified: branches/gcc-6-branch/gcc/ChangeLog branches/gcc-6-branch/gcc/convert.c branches/gcc-6-branch/gcc/fold-const.c branches/gcc-6-branch/gcc/match.pd branches/gcc-6-branch/gcc/testsuite/ChangeLog branches/gcc-6-branch/gcc/tree-ssa-sccvn.c branches/gcc-6-branch/gcc/tree-ssa-sccvn.h branches/gcc-6-branch/gcc/tree.c