aboutsummaryrefslogtreecommitdiff
path: root/gcc/hwint.h
diff options
context:
space:
mode:
authorRichard Sandiford <richard.sandiford@arm.com>2018-07-30 11:23:26 +0000
committerRichard Sandiford <rsandifo@gcc.gnu.org>2018-07-30 11:23:26 +0000
commit1dcadcf01d48dda372630478140e3fb4f6bc73ee (patch)
treedd31e77ca31e106f993854b34e2832c8ad8edd9a /gcc/hwint.h
parentdc843a8597ef7ac7f2663120ae96c689c2dbbadb (diff)
downloadgcc-1dcadcf01d48dda372630478140e3fb4f6bc73ee.zip
gcc-1dcadcf01d48dda372630478140e3fb4f6bc73ee.tar.gz
gcc-1dcadcf01d48dda372630478140e3fb4f6bc73ee.tar.bz2
Resync inline implementation of ceil_log2 (PR 86506)
In r262961 I only updated the out-of-line copy of ceil_log2. This patch applies the same change to the other (inline) one. 2018-07-30 Richard Sandiford <richard.sandiford@arm.com> gcc/ PR tree-optimization/86506 * hwint.h (ceil_log2): Resync with hwint.c implementation. From-SVN: r263064
Diffstat (limited to 'gcc/hwint.h')
-rw-r--r--gcc/hwint.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/gcc/hwint.h b/gcc/hwint.h
index 5054d8e..8068cad 100644
--- a/gcc/hwint.h
+++ b/gcc/hwint.h
@@ -242,7 +242,7 @@ floor_log2 (unsigned HOST_WIDE_INT x)
static inline int
ceil_log2 (unsigned HOST_WIDE_INT x)
{
- return floor_log2 (x - 1) + 1;
+ return x == 0 ? 0 : floor_log2 (x - 1) + 1;
}
static inline int