diff options
author | law <law@138bc75d-0d04-0410-961f-82ee72b054a4> | 1998-09-10 01:03:02 +0000 |
---|---|---|
committer | law <law@138bc75d-0d04-0410-961f-82ee72b054a4> | 1998-09-10 01:03:02 +0000 |
commit | f43291cf0ba4be9b8ace1888977ce048a450f8ab (patch) | |
tree | 04b5cc79c2157ea596f0752fa023d8245f787941 /gcc/reg-stack.c | |
parent | ab44be80e08931ca675ee4b2d20e5d2dc134adbd (diff) | |
download | gcc-f43291cf0ba4be9b8ace1888977ce048a450f8ab.tar.gz |
* reg-stack.c (straighten_stack): Do nothing if the virtual stack is
empty or has a single entry.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@22376 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/reg-stack.c')
-rw-r--r-- | gcc/reg-stack.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/gcc/reg-stack.c b/gcc/reg-stack.c index ab400c51f1d..a7a5fb7cd90 100644 --- a/gcc/reg-stack.c +++ b/gcc/reg-stack.c @@ -309,6 +309,13 @@ straighten_stack (insn, regstack) struct stack_def temp_stack; int top; + /* If there is only a single register on the stack, then the stack is + already in increasing order and no reorganization is needed. + + Similarly if the stack is empty. */ + if (regstack->top <= 0) + return; + temp_stack.reg_set = regstack->reg_set; for (top = temp_stack.top = regstack->top; top >= 0; top--) |