summaryrefslogtreecommitdiff
path: root/gcc/lra-eliminations.c
diff options
context:
space:
mode:
authorvmakarov <vmakarov@138bc75d-0d04-0410-961f-82ee72b054a4>2013-04-22 14:26:51 +0000
committervmakarov <vmakarov@138bc75d-0d04-0410-961f-82ee72b054a4>2013-04-22 14:26:51 +0000
commitfbb45ff16ad0870e6ba4243da2aa6317103dae8e (patch)
tree972114b4e0989e2e816099da413dd707f4b716fd /gcc/lra-eliminations.c
parentea4d38ee9bafc04110155147671e477290da5833 (diff)
downloadgcc-fbb45ff16ad0870e6ba4243da2aa6317103dae8e.tar.gz
2013-04-22 Vladimir Makarov <vmakarov@redhat.com>
PR target/57018 * lra-eliminations.c (mark_not_eliminable): Prevent elimination of a set sp if no stack realignment. 2013-04-22 Vladimir Makarov <vmakarov@redhat.com> PR target/57018 * gcc.target/i386/pr57018.c: New test. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@198140 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/lra-eliminations.c')
-rw-r--r--gcc/lra-eliminations.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/gcc/lra-eliminations.c b/gcc/lra-eliminations.c
index b8ec69fdcd9..27a5d7560c5 100644
--- a/gcc/lra-eliminations.c
+++ b/gcc/lra-eliminations.c
@@ -716,7 +716,9 @@ mark_not_eliminable (rtx x)
ep++)
if (ep->to_rtx == SET_DEST (x)
&& SET_DEST (x) != hard_frame_pointer_rtx
- && (GET_CODE (SET_SRC (x)) != PLUS
+ && (! (SUPPORTS_STACK_ALIGNMENT && stack_realign_fp
+ && REGNO (ep->to_rtx) == STACK_POINTER_REGNUM)
+ || 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);