diff options
author | Jakub Jelinek <jakub@redhat.com> | 2011-08-26 14:15:25 +0200 |
---|---|---|
committer | Jakub Jelinek <jakub@gcc.gnu.org> | 2011-08-26 14:15:25 +0200 |
commit | 8840ae2b0930c8150b7b55285dae91557cc3c872 (patch) | |
tree | 38c43d9eeba68b3c670a4a594f19e3b254a85720 /gcc | |
parent | 321358d4e4b17f1c4c0cfb88541d4e8c2720be5d (diff) | |
download | gcc-8840ae2b0930c8150b7b55285dae91557cc3c872.zip gcc-8840ae2b0930c8150b7b55285dae91557cc3c872.tar.gz gcc-8840ae2b0930c8150b7b55285dae91557cc3c872.tar.bz2 |
* rtlanal.c (nonzero_bits1): Handle CLRSB.
From-SVN: r178101
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/ChangeLog | 4 | ||||
-rw-r--r-- | gcc/rtlanal.c | 9 |
2 files changed, 11 insertions, 2 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index c8d97d8..7d32ee1 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,7 @@ +2011-08-26 Jakub Jelinek <jakub@redhat.com> + + * rtlanal.c (nonzero_bits1): Handle CLRSB. + 2011-08-26 Richard Guenther <rguenther@suse.de> * expr.c (string_constant): Handle &MEM_REF. diff --git a/gcc/rtlanal.c b/gcc/rtlanal.c index 7fa3ca6..d6e84a2 100644 --- a/gcc/rtlanal.c +++ b/gcc/rtlanal.c @@ -1,7 +1,7 @@ /* Analyze RTL for GNU compiler. Copyright (C) 1987, 1988, 1992, 1993, 1994, 1995, 1996, 1997, 1998, - 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 - Free Software Foundation, Inc. + 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, + 2011 Free Software Foundation, Inc. This file is part of GCC. @@ -4273,6 +4273,11 @@ nonzero_bits1 (const_rtx x, enum machine_mode mode, const_rtx known_x, nonzero = -1; break; + case CLRSB: + /* This is at most the number of bits in the mode minus 1. */ + nonzero = ((unsigned HOST_WIDE_INT) 1 << (floor_log2 (mode_width))) - 1; + break; + case PARITY: nonzero = 1; break; |