diff options
author | bernds <bernds@138bc75d-0d04-0410-961f-82ee72b054a4> | 2012-09-28 20:32:55 +0000 |
---|---|---|
committer | bernds <bernds@138bc75d-0d04-0410-961f-82ee72b054a4> | 2012-09-28 20:32:55 +0000 |
commit | 36faf01bcfc5c3f3d9c2be33f39d585eda61c101 (patch) | |
tree | 247621f2e57181c9c2fd27754a1407dc19f88749 /gcc/sched-deps.c | |
parent | 42dcea8981976bd1be9eca312c1d1e3384155928 (diff) | |
download | gcc-36faf01bcfc5c3f3d9c2be33f39d585eda61c101.tar.gz |
PR bootstrap/54688
* sched-deps.c (parse_add_or_inc): Remove MINUS handling. Take
STACK_GROWS_DOWNWARD into account.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@191838 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/sched-deps.c')
-rw-r--r-- | gcc/sched-deps.c | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/gcc/sched-deps.c b/gcc/sched-deps.c index f53caddf735..6625a53a699 100644 --- a/gcc/sched-deps.c +++ b/gcc/sched-deps.c @@ -4600,8 +4600,7 @@ parse_add_or_inc (struct mem_inc_info *mii, rtx insn, bool before_mem) if (!REG_P (SET_DEST (pat))) return false; - if (GET_CODE (SET_SRC (pat)) != PLUS - && GET_CODE (SET_SRC (pat)) != MINUS) + if (GET_CODE (SET_SRC (pat)) != PLUS) return false; mii->inc_insn = insn; @@ -4629,9 +4628,14 @@ parse_add_or_inc (struct mem_inc_info *mii, rtx insn, bool before_mem) } if (regs_equal && REGNO (SET_DEST (pat)) == STACK_POINTER_REGNUM) - /* Note that the sign has already been reversed for !before_mem. */ - return mii->inc_constant > 0; - + { + /* Note that the sign has already been reversed for !before_mem. */ +#ifdef STACK_GROWS_DOWNWARD + return mii->inc_constant > 0; +#else + return mii->inc_constant < 0; +#endif + } return true; } |