OSDN Git Service

Fix PR45230, PR45231, and PR45370: fold_stmt_inplace after replace_exp.
authorspop <spop@138bc75d-0d04-0410-961f-82ee72b054a4>
Wed, 8 Dec 2010 23:01:40 +0000 (23:01 +0000)
committerspop <spop@138bc75d-0d04-0410-961f-82ee72b054a4>
Wed, 8 Dec 2010 23:01:40 +0000 (23:01 +0000)
commit40463847db454e793f46a7fe2a2d7683d7e34ced
treef1c5454ba13ad564e707268d461dc545286230f7
parent74d2efbc4a85bb0f44935ce2fa8b2f4161069563
Fix PR45230, PR45231, and PR45370: fold_stmt_inplace after replace_exp.

2010-12-08  Richard Guenther  <rguenther@suse.de>
    Sebastian Pop  <sebastian.pop@amd.com>

PR tree-optimization/45230
PR tree-optimization/45231
PR tree-optimization/45370
* sese.c (rename_uses): Returns a bool.  Call
recompute_tree_invariant_for_addr_expr only on the RHS of a
GIMPLE_ASSIGN.
(graphite_copy_stmts_from_block): Call fold_stmt_inplace when
rename_uses returns true.
* tree-ssa-copy.c (replace_exp): Add a comment about calling
fold_stmt_inplace after replace_exp.

* gcc.dg/graphite/id-pr45230-1.c: New.
* gcc.dg/graphite/id-pr45231.c: New.
* gfortran.dg/graphite/id-pr45370.f90: New.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@167609 138bc75d-0d04-0410-961f-82ee72b054a4
gcc/ChangeLog
gcc/sese.c
gcc/testsuite/ChangeLog
gcc/testsuite/gcc.dg/graphite/id-pr45230-1.c [new file with mode: 0644]
gcc/testsuite/gcc.dg/graphite/id-pr45231.c [new file with mode: 0644]
gcc/testsuite/gfortran.dg/graphite/id-pr45370.f90 [new file with mode: 0644]
gcc/tree-ssa-copy.c