re PR tree-optimization/63677 (Failure to constant fold with vectorization.)
authorRichard Biener <rguenther@suse.de>
Thu, 20 Nov 2014 08:40:52 +0000 (08:40 +0000)
committerRichard Biener <rguenth@gcc.gnu.org>
Thu, 20 Nov 2014 08:40:52 +0000 (08:40 +0000)
commitb00734dfd64b2014140f84b821d1fdcd4a53affe
tree5d4a056252b3e804e9604d0f82ccc69c816b9ff2
parent07dc4e8707bd1e631b42a7375e368505d107cc9d
re PR tree-optimization/63677 (Failure to constant fold with vectorization.)

2014-11-20   Richard Biener  <rguenther@suse.de>

PR tree-optimization/63677
* tree-ssa-dom.c: Include gimplify.h for unshare_expr.
(avail_exprs_stack): Make a vector of pairs.
(struct hash_expr_elt): Replace stmt member with vop member.
(expr_elt_hasher::equal): Simplify.
(initialize_hash_element): Adjust.
(initialize_hash_element_from_expr): Likewise.
(dom_opt_dom_walker::thread_across_edge): Likewise.
(record_cond): Likewise.
(dom_opt_dom_walker::before_dom_children): Likewise.
(print_expr_hash_elt): Likewise.
(remove_local_expressions_from_table): Restore previous state
if requested.
(record_equivalences_from_stmt): Record &x + CST as constant
&MEM[&x, CST] for further propagation.
(vuse_eq): New function.
(lookup_avail_expr): For loads use the alias oracle to see
whether a candidate from the expr hash is usable.
(avail_expr_hash): Do not hash VUSEs.

* gcc.dg/tree-ssa/ssa-dom-cse-2.c: New testcase.
* gcc.dg/tree-ssa/ssa-dom-cse-3.c: Likewise.

From-SVN: r217827
gcc/ChangeLog
gcc/testsuite/ChangeLog
gcc/testsuite/gcc.dg/tree-ssa/ssa-dom-cse-2.c [new file with mode: 0644]
gcc/testsuite/gcc.dg/tree-ssa/ssa-dom-cse-3.c [new file with mode: 0644]
gcc/tree-ssa-dom.c