diff options
author | H.J. Lu <hongjiu.lu@intel.com> | 2011-06-24 13:41:40 +0000 |
---|---|---|
committer | H.J. Lu <hjl@gcc.gnu.org> | 2011-06-24 06:41:40 -0700 |
commit | 5ac6c59eddf13e25a8d0ad26611d8ba58eedbf8f (patch) | |
tree | 2350453a447ab6f8f45feff8caeeb64c32acc98e /gcc/rtlanal.c | |
parent | b807e627309cb88537a127946c22abf31d358c51 (diff) | |
download | gcc-5ac6c59eddf13e25a8d0ad26611d8ba58eedbf8f.zip gcc-5ac6c59eddf13e25a8d0ad26611d8ba58eedbf8f.tar.gz gcc-5ac6c59eddf13e25a8d0ad26611d8ba58eedbf8f.tar.bz2 |
Properly handle pointer addition/subtraction.
2011-06-24 H.J. Lu <hongjiu.lu@intel.com>
PR rtl-optimization/49504
* rtlanal.c (nonzero_bits1): Properly handle addition or
subtraction a pointer in Pmode if pointers extend unsigned.
From-SVN: r175377
Diffstat (limited to 'gcc/rtlanal.c')
-rw-r--r-- | gcc/rtlanal.c | 14 |
1 files changed, 0 insertions, 14 deletions
diff --git a/gcc/rtlanal.c b/gcc/rtlanal.c index b52957d..e5c045d 100644 --- a/gcc/rtlanal.c +++ b/gcc/rtlanal.c @@ -4134,20 +4134,6 @@ nonzero_bits1 (const_rtx x, enum machine_mode mode, const_rtx known_x, if (result_low > 0) nonzero &= ~(((unsigned HOST_WIDE_INT) 1 << result_low) - 1); - -#ifdef POINTERS_EXTEND_UNSIGNED - /* If pointers extend unsigned and this is an addition or subtraction - to a pointer in Pmode, all the bits above ptr_mode are known to be - zero. */ - /* As we do not know which address space the pointer is refering to, - we can do this only if the target does not support different pointer - or address modes depending on the address space. */ - if (target_default_pointer_address_modes_p () - && POINTERS_EXTEND_UNSIGNED > 0 && GET_MODE (x) == Pmode - && (code == PLUS || code == MINUS) - && REG_P (XEXP (x, 0)) && REG_POINTER (XEXP (x, 0))) - nonzero &= GET_MODE_MASK (ptr_mode); -#endif } break; |