summaryrefslogtreecommitdiff
path: root/gcc/rtlanal.c
diff options
context:
space:
mode:
authorjakub <jakub@138bc75d-0d04-0410-961f-82ee72b054a4>2011-08-26 12:15:25 +0000
committerjakub <jakub@138bc75d-0d04-0410-961f-82ee72b054a4>2011-08-26 12:15:25 +0000
commit3b23b4cce8a3397e830b9e57e66ce9a35dbbdd7b (patch)
tree38c43d9eeba68b3c670a4a594f19e3b254a85720 /gcc/rtlanal.c
parentf32d300e7da31c677823798d7a57534953310f1e (diff)
downloadgcc-3b23b4cce8a3397e830b9e57e66ce9a35dbbdd7b.tar.gz
* rtlanal.c (nonzero_bits1): Handle CLRSB.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@178101 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/rtlanal.c')
-rw-r--r--gcc/rtlanal.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/gcc/rtlanal.c b/gcc/rtlanal.c
index 7fa3ca6f315..d6e84a22221 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;