summaryrefslogtreecommitdiff
path: root/gcc/cselib.c
diff options
context:
space:
mode:
authorbstarynk <bstarynk@138bc75d-0d04-0410-961f-82ee72b054a4>2011-11-06 15:16:32 +0000
committerbstarynk <bstarynk@138bc75d-0d04-0410-961f-82ee72b054a4>2011-11-06 15:16:32 +0000
commit31ba6c3ff2311bad9422246f49d59c532cbb5078 (patch)
tree6e862e3ea14b2edf93a92c404a0d9b29f3f9ba65 /gcc/cselib.c
parentbab85b65e545231656361b997a81fb8a44b266b4 (diff)
downloadgcc-31ba6c3ff2311bad9422246f49d59c532cbb5078.tar.gz
2011-11-06 Basile Starynkevitch <basile@starynkevitch.net>
MELT branch merged with trunk rev 181026 using svnmerge git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/melt-branch@181034 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/cselib.c')
-rw-r--r--gcc/cselib.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/gcc/cselib.c b/gcc/cselib.c
index b96c0cd07ab..ef397db8d1c 100644
--- a/gcc/cselib.c
+++ b/gcc/cselib.c
@@ -185,7 +185,7 @@ static cselib_val dummy_val;
that is constant through the whole function and should never be
eliminated. */
static cselib_val *cfa_base_preserved_val;
-static unsigned int cfa_base_preserved_regno;
+static unsigned int cfa_base_preserved_regno = INVALID_REGNUM;
/* Used to list all values that contain memory reference.
May or may not contain the useless values - the list is compacted
@@ -1451,7 +1451,7 @@ cselib_expand_value_rtx_1 (rtx orig, struct expand_value_data *evd,
if (GET_MODE (l->elt->val_rtx) == GET_MODE (orig))
{
rtx result;
- int regno = REGNO (orig);
+ unsigned regno = REGNO (orig);
/* The only thing that we are not willing to do (this
is requirement of dse and if others potential uses
@@ -1471,7 +1471,8 @@ cselib_expand_value_rtx_1 (rtx orig, struct expand_value_data *evd,
make the frame assumptions. */
if (regno == STACK_POINTER_REGNUM
|| regno == FRAME_POINTER_REGNUM
- || regno == HARD_FRAME_POINTER_REGNUM)
+ || regno == HARD_FRAME_POINTER_REGNUM
+ || regno == cfa_base_preserved_regno)
return orig;
bitmap_set_bit (evd->regs_active, regno);