diff options
author | Steven Bosscher <stevenb@suse.de> | 2005-07-31 21:45:44 +0000 |
---|---|---|
committer | Steven Bosscher <steven@gcc.gnu.org> | 2005-07-31 21:45:44 +0000 |
commit | a3f4b7d835009918910989ea72092a11d5b21d9f (patch) | |
tree | 0bf30b7ec7d1ef7b0cf50fc733b32d6558e390e7 /gcc/postreload-gcse.c | |
parent | 16275f18ffb2ebbffad5474aa14d4e170acdd1f5 (diff) | |
download | gcc-a3f4b7d835009918910989ea72092a11d5b21d9f.zip gcc-a3f4b7d835009918910989ea72092a11d5b21d9f.tar.gz gcc-a3f4b7d835009918910989ea72092a11d5b21d9f.tar.bz2 |
re PR target/23095 (ICE in regstack compensate_edge)
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.
From-SVN: r102610
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 a0334ab..ea9c0ef7 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) |