diff options
author | pthaugen <pthaugen@138bc75d-0d04-0410-961f-82ee72b054a4> | 2011-02-11 20:52:55 +0000 |
---|---|---|
committer | pthaugen <pthaugen@138bc75d-0d04-0410-961f-82ee72b054a4> | 2011-02-11 20:52:55 +0000 |
commit | 017b70473eced9adf13d500f920f1f9a671abb10 (patch) | |
tree | 7fab30b82e8b3e6630893a048325c907c25d1e18 /gcc/postreload.c | |
parent | 9e9f1ccb52308a4c3e3a6f49da923b2f235c0562 (diff) | |
download | gcc-017b70473eced9adf13d500f920f1f9a671abb10.tar.gz |
PR rtl-optimization/47614
* rtl.h (check_for_inc_dec): Declare.
* dse.c (check_for_inc_dec): Externalize...
* postreload.c (reload_cse_simplify): ...use it before deleting stmt.
(reload_cse_simplify_operands): Don't simplify opnds with side effects.
* testsuite/gfortran.dg/pr47614.f: New.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@170059 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/postreload.c')
-rw-r--r-- | gcc/postreload.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/gcc/postreload.c b/gcc/postreload.c index 5cd26a79ddf..a4234102301 100644 --- a/gcc/postreload.c +++ b/gcc/postreload.c @@ -112,6 +112,7 @@ reload_cse_simplify (rtx insn, rtx testreg) if (REG_P (value) && ! REG_FUNCTION_VALUE_P (value)) value = 0; + check_for_inc_dec (insn); delete_insn_and_edges (insn); return; } @@ -163,6 +164,7 @@ reload_cse_simplify (rtx insn, rtx testreg) if (i < 0) { + check_for_inc_dec (insn); delete_insn_and_edges (insn); /* We're done with this insn. */ return; @@ -476,6 +478,8 @@ reload_cse_simplify_operands (rtx insn, rtx testreg) continue; } #endif /* LOAD_EXTEND_OP */ + if (side_effects_p (op)) + continue; v = cselib_lookup (op, recog_data.operand_mode[i], 0, VOIDmode); if (! v) continue; |