diff options
author | vmakarov <vmakarov@138bc75d-0d04-0410-961f-82ee72b054a4> | 2013-01-10 20:07:55 +0000 |
---|---|---|
committer | vmakarov <vmakarov@138bc75d-0d04-0410-961f-82ee72b054a4> | 2013-01-10 20:07:55 +0000 |
commit | 9441d07f40cffa05d79e3d5315b72cd198adbc73 (patch) | |
tree | 09bb4a0e280d042f035bedbc5671165536e5597a /gcc/lra-eliminations.c | |
parent | 91f28fc1c95f7bb9e3986a717c3ef5091f9206a5 (diff) | |
download | gcc-9441d07f40cffa05d79e3d5315b72cd198adbc73.tar.gz |
2013-01-10 Vladimir Makarov <vmakarov@redhat.com>
PR rtl-optimization/pr55672
* lra-eliminations.c (mark_not_elimnable): Permit addition with
const to be elimnable.
2013-01-10 Vladimir Makarov <vmakarov@redhat.com>
PR rtl-optimization/pr55672
* gcc.target/i386/pr55672.c: New.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@195095 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/lra-eliminations.c')
-rw-r--r-- | gcc/lra-eliminations.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/gcc/lra-eliminations.c b/gcc/lra-eliminations.c index 24c58f699c9..807ac16025a 100644 --- a/gcc/lra-eliminations.c +++ b/gcc/lra-eliminations.c @@ -657,7 +657,7 @@ mark_not_eliminable (rtx x) case PRE_MODIFY: if (REG_P (XEXP (x, 0)) && REGNO (XEXP (x, 0)) < FIRST_PSEUDO_REGISTER) /* If we modify the source of an elimination rule, disable - it. Do the same if it is the source and not the hard frame + it. Do the same if it is the source and not the hard frame register. */ for (ep = reg_eliminate; ep < ®_eliminate[NUM_ELIMINABLE_REGS]; @@ -716,7 +716,10 @@ mark_not_eliminable (rtx x) ep < ®_eliminate[NUM_ELIMINABLE_REGS]; ep++) if (ep->to_rtx == SET_DEST (x) - && SET_DEST (x) != hard_frame_pointer_rtx) + && SET_DEST (x) != hard_frame_pointer_rtx + && (GET_CODE (SET_SRC (x)) != PLUS + || XEXP (SET_SRC (x), 0) != SET_DEST (x) + || ! CONST_INT_P (XEXP (SET_SRC (x), 1)))) setup_can_eliminate (ep, false); } |