re PR tree-optimization/81741 (Misoptimisation : replacing a constant field read...
authorJeff Law <law@redhat.com>
Tue, 22 Aug 2017 15:13:09 +0000 (09:13 -0600)
committerJeff Law <law@gcc.gnu.org>
Tue, 22 Aug 2017 15:13:09 +0000 (09:13 -0600)
commit0db8ddfcb660397bab428ce0d271967d24c23177
tree4004740d0a74395c77ee7b55de8e23b4d1a201a6
parentd4c550fd0ecb17d577353074c58283e942d1f870
re PR tree-optimization/81741 (Misoptimisation : replacing a constant field read access by a function call)

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.

From-SVN: r251279
13 files changed:
gcc/ChangeLog
gcc/testsuite/ChangeLog
gcc/testsuite/gcc.dg/tree-ssa/20030922-2.c
gcc/testsuite/gcc.dg/tree-ssa/pr71947-1.c
gcc/testsuite/gcc.dg/tree-ssa/pr71947-2.c
gcc/testsuite/gcc.dg/tree-ssa/pr71947-3.c
gcc/testsuite/gcc.dg/tree-ssa/pr71947-7.c [new file with mode: 0644]
gcc/testsuite/gcc.dg/tree-ssa/pr71947-8.c [new file with mode: 0644]
gcc/testsuite/gcc.dg/tree-ssa/pr71947-9.c [new file with mode: 0644]
gcc/testsuite/gcc.dg/tree-ssa/pr81741.c [new file with mode: 0644]
gcc/tree-ssa-dom.c
gcc/tree-ssa-scopedtables.c
gcc/tree-ssa-scopedtables.h