diff options
author | Tom de Vries <tom@codesourcery.com> | 2012-11-19 09:35:48 +0000 |
---|---|---|
committer | Tom de Vries <vries@gcc.gnu.org> | 2012-11-19 09:35:48 +0000 |
commit | bc2164e876329706b17f646bcc2860100a569006 (patch) | |
tree | e2c5055bc7d6f18a6269a1969fbdc1175dcd3961 /gcc | |
parent | a3ce4803ea9fff9ae6d8a604f5e9cbe6396ac75d (diff) | |
download | gcc-bc2164e876329706b17f646bcc2860100a569006.zip gcc-bc2164e876329706b17f646bcc2860100a569006.tar.gz gcc-bc2164e876329706b17f646bcc2860100a569006.tar.bz2 |
re PR rtl-optimization/55315 (comparing address to constant is folded in cse)
2012-11-19 Tom de Vries <tom@codesourcery.com>
PR rtl-optimization/55315
* rtlanal.c (nonzero_address_p): Don't assume a nonzero address plus a
const is a nonzero address.
From-SVN: r193616
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/ChangeLog | 7 | ||||
-rw-r--r-- | gcc/rtlanal.c | 4 |
2 files changed, 8 insertions, 3 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 0efb46c..e7c797c 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,10 @@ +2012-11-19 Tom de Vries <tom@codesourcery.com> + + PR rtl-optimization/55315 + + * rtlanal.c (nonzero_address_p): Don't assume a nonzero address plus a + const is a nonzero address. + 2012-11-18 Sandra Loosemore <sandra@codesourcery.com> * doc/extend.texi: Use @smallexample consistently. Add @noindent diff --git a/gcc/rtlanal.c b/gcc/rtlanal.c index 33be548..ecfae4c 100644 --- a/gcc/rtlanal.c +++ b/gcc/rtlanal.c @@ -392,10 +392,8 @@ nonzero_address_p (const_rtx x) return nonzero_address_p (XEXP (x, 0)); case PLUS: - if (CONST_INT_P (XEXP (x, 1))) - return nonzero_address_p (XEXP (x, 0)); /* Handle PIC references. */ - else if (XEXP (x, 0) == pic_offset_table_rtx + if (XEXP (x, 0) == pic_offset_table_rtx && CONSTANT_P (XEXP (x, 1))) return true; return false; |