From bb75e83fb13edfef8d99262b7c7745a6438ba8bb Mon Sep 17 00:00:00 2001 From: jakub Date: Tue, 16 Oct 2012 11:21:20 +0000 Subject: PR debug/54796 * rtl.h: Document jump flag on VALUE. * cselib.h (cselib_set_value_sp_based, cselib_sp_based_value_p): New prototypes. * alias.c (find_base_term): For cselib_sp_based_value_p return static_reg_base_value[STACK_POINTER_REGNUM]. * cselib.c (SP_BASED_VALUE_P): Define. (cselib_set_value_sp_based, cselib_sp_based_value_p): New functions. * var-tracking.c (add_stores): Call cselib_set_value_sp_based for not yet preserved VALUEs of sp on sp assignments if hard_frame_pointer_adjustment != -1. (vt_initialize): When setting hard_frame_pointer_adjustment, disassociate sp from its previous value and call cselib_set_value_sp_based on a new VALUE created for sp. * gcc.dg/guality/pr54796.c: New test. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@192494 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/alias.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'gcc/alias.c') diff --git a/gcc/alias.c b/gcc/alias.c index 09aef1137ef..244ca520c92 100644 --- a/gcc/alias.c +++ b/gcc/alias.c @@ -1640,6 +1640,9 @@ find_base_term (rtx x) if (!val) return ret; + if (cselib_sp_based_value_p (val)) + return static_reg_base_value[STACK_POINTER_REGNUM]; + f = val->locs; /* Temporarily reset val->locs to avoid infinite recursion. */ val->locs = NULL; -- cgit v1.2.1