diff options
author | steven <steven@138bc75d-0d04-0410-961f-82ee72b054a4> | 2005-07-31 21:45:44 +0000 |
---|---|---|
committer | steven <steven@138bc75d-0d04-0410-961f-82ee72b054a4> | 2005-07-31 21:45:44 +0000 |
commit | 868e8f12d5e5265ca80729bc372853eaf3e6a76b (patch) | |
tree | 0bf30b7ec7d1ef7b0cf50fc733b32d6558e390e7 /gcc/postreload-gcse.c | |
parent | 9c0f3811e38ac215a2362110285087ce216cc98d (diff) | |
download | gcc-868e8f12d5e5265ca80729bc372853eaf3e6a76b.tar.gz |
PR target/23095
* common.opt (flag_gcse_after_reload): Don't initialize to 2.
(flag_rerun_cse_after_loop): Initialize this to 2 instead.
* postreload-gcse.c (hash_scan_set): Do not consider stack regs.
testsuite/
PR target/23095
* gfortran.dg/pr23095.f: New test.
PR c++/22003
* g++.dg/other/pr22003.C: New test.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@102610 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/postreload-gcse.c')
-rw-r--r-- | gcc/postreload-gcse.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/gcc/postreload-gcse.c b/gcc/postreload-gcse.c index a0334ab8077..ea9c0ef7436 100644 --- a/gcc/postreload-gcse.c +++ b/gcc/postreload-gcse.c @@ -745,6 +745,12 @@ hash_scan_set (rtx insn) can_copy_p (GET_MODE (dest)) /* Is SET_SRC something we want to gcse? */ && general_operand (src, GET_MODE (src)) +#ifdef STACK_REGS + /* Never consider insns touching the register stack. It may + create situations that reg-stack cannot handle (e.g. a stack + register live across an abnormal edge). */ + && (REGNO (dest) < FIRST_STACK_REG || REGNO (dest) > LAST_STACK_REG) +#endif /* An expression is not available if its operands are subsequently modified, including this insn. */ && oprs_unchanged_p (src, insn, true)) @@ -759,6 +765,10 @@ hash_scan_set (rtx insn) can_copy_p (GET_MODE (src)) /* Is SET_DEST something we want to gcse? */ && general_operand (dest, GET_MODE (dest)) +#ifdef STACK_REGS + /* As above for STACK_REGS. */ + && (REGNO (src) < FIRST_STACK_REG || REGNO (src) > LAST_STACK_REG) +#endif && ! (flag_float_store && FLOAT_MODE_P (GET_MODE (dest))) /* Check if the memory expression is killed after insn. */ && ! load_killed_in_block_p (INSN_CUID (insn) + 1, dest, true) |