2013-04-16 Richard Biener <rguenther@suse.de>
commitbc9af2dd1999bf9fed905fe5ba58c578ae157561
authorrguenth <rguenth@138bc75d-0d04-0410-961f-82ee72b054a4>
Tue, 16 Apr 2013 15:32:26 +0000 (16 15:32 +0000)
committerrguenth <rguenth@138bc75d-0d04-0410-961f-82ee72b054a4>
Tue, 16 Apr 2013 15:32:26 +0000 (16 15:32 +0000)
tree06c4c358c5207acc9ab8ce629b72aa388bf6412e
parentf6c9c56eee25b1877f8c1555906446e2617aca44
2013-04-16  Richard Biener  <rguenther@suse.de>

PR tree-optimization/56756
* tree-ssa-loop-im.c (struct first_mem_ref_loc_1): New functor.
(first_mem_ref_loc): New.
(execute_sm): Place the load temporarily before a previous
access instead of in the latch edge to ensure its SSA dependencies
are defined at points dominating the load.

* gcc.dg/torture/pr56756.c: New testcase.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@198001 138bc75d-0d04-0410-961f-82ee72b054a4
gcc/ChangeLog
gcc/testsuite/ChangeLog
gcc/testsuite/gcc.dg/torture/pr56756.c [new file with mode: 0644]
gcc/tree-ssa-loop-im.c