https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81741
--- Comment #7 from Aldy Hernandez <aldyh at gcc dot gnu.org> --- Author: aldyh Date: Wed Sep 13 17:20:19 2017 New Revision: 252532 URL: https://gcc.gnu.org/viewcvs?rev=252532&root=gcc&view=rev Log: PR tree-optimization/81741 PR tree-optimization/71947 * tree-ssa-dom.c: Include tree-inline.h. (record_temporary_equivalences): Only record SSA_NAME = SSA_NAME equivalences if one is more expensive to compute than the other. * tree-ssa-scopedtables.h (class const_or_copies): Make record_const_or_copy_raw method private. (class avail_exprs_stack): New method simplify_binary_operation. * tree-ssa-scopedtables.c (avail_exprs_stack::lookup_avail_expr): Call avail_exprs_stack::simplify_binary_operation as needed. (avail_exprs_stack::simplify_binary_operation): New function. PR tree-optimization/81741 PR tree-optimization/71947 * gcc.dg/tree-ssa/pr81741.c: New test. * gcc.dg/tree-ssa/pr71947-7.c: New test. * gcc.dg/tree-ssa/pr71947-8.c: New test. * gcc.dg/tree-ssa/pr71947-9.c: New test. * gcc.dg/tree-ssa/pr71941-1.c: Tweak expected output. * gcc.dg/tree-ssa/pr71941-2.c: Tweak expected output. * gcc.dg/tree-ssa/pr71941-3.c: Tweak expected output. * gcc.dg/tree-ssa/20030922-2.c: xfail. Added: branches/range-gen2/gcc/testsuite/gcc.dg/tree-ssa/pr71947-7.c - copied, changed from r252531, branches/range-gen2/gcc/testsuite/gcc.dg/tree-ssa/pr71947-2.c branches/range-gen2/gcc/testsuite/gcc.dg/tree-ssa/pr71947-8.c - copied, changed from r252531, branches/range-gen2/gcc/testsuite/gcc.dg/tree-ssa/pr71947-2.c branches/range-gen2/gcc/testsuite/gcc.dg/tree-ssa/pr71947-9.c - copied, changed from r252531, branches/range-gen2/gcc/testsuite/gcc.dg/tree-ssa/pr71947-2.c branches/range-gen2/gcc/testsuite/gcc.dg/tree-ssa/pr81741.c Modified: branches/range-gen2/gcc/ChangeLog branches/range-gen2/gcc/testsuite/ChangeLog branches/range-gen2/gcc/testsuite/gcc.dg/tree-ssa/20030922-2.c branches/range-gen2/gcc/testsuite/gcc.dg/tree-ssa/pr71947-1.c branches/range-gen2/gcc/testsuite/gcc.dg/tree-ssa/pr71947-2.c branches/range-gen2/gcc/testsuite/gcc.dg/tree-ssa/pr71947-3.c branches/range-gen2/gcc/tree-ssa-dom.c branches/range-gen2/gcc/tree-ssa-scopedtables.c branches/range-gen2/gcc/tree-ssa-scopedtables.h