From: Jeff Law Date: Fri, 2 Oct 1998 00:17:52 +0000 (-0600) Subject: reg-stack.c (straighten_stack): Do nothing if the virtual stack is empty or has a... X-Git-Tag: prereleases/egcs-1.1.1-pre~40 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=77ad537cca8cdcd2ca9c59cba1f0b1b207f2efcb;p=thirdparty%2Fgcc.git reg-stack.c (straighten_stack): Do nothing if the virtual stack is empty or has a single entry. 0 * reg-stack.c (straighten_stack): Do nothing if the virtual stack is empty or has a single entry. From-SVN: r22728 --- diff --git a/gcc/reg-stack.c b/gcc/reg-stack.c index ab400c51f1d1..a7a5fb7cd902 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--)