aboutsummaryrefslogtreecommitdiff
path: root/gcc/loop.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/loop.c')
-rw-r--r--gcc/loop.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/gcc/loop.c b/gcc/loop.c
index 989df7b..6f68b58 100644
--- a/gcc/loop.c
+++ b/gcc/loop.c
@@ -2661,7 +2661,8 @@ invariant_p (x)
case REG:
/* We used to check RTX_UNCHANGING_P (x) here, but that is invalid
since the reg might be set by initialization within the loop. */
- if (x == frame_pointer_rtx || x == arg_pointer_rtx)
+ if (x == frame_pointer_rtx || x == hard_frame_pointer_rtx
+ || x == arg_pointer_rtx)
return 1;
if (loop_has_call
&& REGNO (x) < FIRST_PSEUDO_REGISTER && call_used_regs[REGNO (x)])