diff options
author | kenner <kenner@138bc75d-0d04-0410-961f-82ee72b054a4> | 1995-11-26 19:32:34 +0000 |
---|---|---|
committer | kenner <kenner@138bc75d-0d04-0410-961f-82ee72b054a4> | 1995-11-26 19:32:34 +0000 |
commit | 3ab138338ee9a6cd43d1ea8780b229dc25fb63aa (patch) | |
tree | 29fadcb1bef11651421212193839f421d260313e /gcc/combine.c | |
parent | 4db80497dae8d3089eee182fe31d803061c3e87f (diff) | |
download | gcc-3ab138338ee9a6cd43d1ea8780b229dc25fb63aa.tar.gz |
(nonzero_bits, case REG): Put POINTERS_EXTEND_UNSIGNED code before
stack pointer code. Return nonzero at end of stack pointer code.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@10600 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/combine.c')
-rw-r--r-- | gcc/combine.c | 21 |
1 files changed, 12 insertions, 9 deletions
diff --git a/gcc/combine.c b/gcc/combine.c index 9d13e52b0dc..473adc83460 100644 --- a/gcc/combine.c +++ b/gcc/combine.c @@ -6850,6 +6850,14 @@ nonzero_bits (x, mode) switch (code) { case REG: +#ifdef POINTERS_EXTEND_UNSIGNED + /* If pointers extend unsigned and this is a pointer in Pmode, say that + all the bits above ptr_mode are known to be zero. */ + if (POINTERS_EXTEND_UNSIGNED && GET_MODE (x) == Pmode + && REGNO_POINTER_FLAG (REGNO (x))) + nonzero &= GET_MODE_MASK (ptr_mode); +#endif + #ifdef STACK_BOUNDARY /* If this is the stack pointer, we may know something about its alignment. If PUSH_ROUNDING is defined, it is possible for the @@ -6864,18 +6872,13 @@ nonzero_bits (x, mode) sp_alignment = MIN (PUSH_ROUNDING (1), sp_alignment); #endif - nonzero &= ~ (sp_alignment - 1); + /* We must return here, otherwise we may get a worse result from + one of the choices below. There is nothing useful below as + far as the stack pointer is concerned. */ + return nonzero &= ~ (sp_alignment - 1); } #endif -#ifdef POINTERS_EXTEND_UNSIGNED - /* If pointers extend unsigned and this is a pointer in Pmode, say that - all the bits above ptr_mode are known to be zero. */ - if (POINTERS_EXTEND_UNSIGNED && GET_MODE (x) == Pmode - && REGNO_POINTER_FLAG (REGNO (x))) - nonzero &= GET_MODE_MASK (ptr_mode); -#endif - /* If X is a register whose nonzero bits value is current, use it. Otherwise, if X is a register whose value we can find, use that value. Otherwise, use the previously-computed global nonzero bits |