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
This commit is contained in:
Richard Sandiford 2018-07-30 11:23:26 +00:00 committed by Richard Sandiford
parent dc843a8597
commit 1dcadcf01d
2 changed files with 6 additions and 1 deletions

View File

@ -1,3 +1,8 @@
2018-07-30 Richard Sandiford <richard.sandiford@arm.com>
PR tree-optimization/86506
* hwint.h (ceil_log2): Resync with hwint.c implementation.
2018-07-30 Ilya Leoshkevich <iii@linux.ibm.com>
PR target/86547

View File

@ -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