diff options
Diffstat (limited to 'gcc/combine.c')
-rw-r--r-- | gcc/combine.c | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/gcc/combine.c b/gcc/combine.c index 77653744895..2abd3d86c5c 100644 --- a/gcc/combine.c +++ b/gcc/combine.c @@ -6661,17 +6661,15 @@ get_pos_from_mask (unsigned HOST_WIDE_INT m, unsigned HOST_WIDE_INT *plen) { /* Get the bit number of the first 1 bit from the right, -1 if none. */ int pos = exact_log2 (m & -m); - int len; - - if (pos < 0) - return -1; + int len = 0; - /* Now shift off the low-order zero bits and see if we have a power of - two minus 1. */ - len = exact_log2 ((m >> pos) + 1); + if (pos >= 0) + /* Now shift off the low-order zero bits and see if we have a + power of two minus 1. */ + len = exact_log2 ((m >> pos) + 1); if (len <= 0) - return -1; + pos = -1; *plen = len; return pos; |