In r262961 I only updated the out-of-line copy of ceil_log2. This patch applies the same change to the other (inline) one.
Tested on aarch64-linux-gnu and x86_64-linux-gnu. Applied as obvious. Richard 2018-07-30 Richard Sandiford <richard.sandif...@arm.com> gcc/ * hwint.h (ceil_log2): Resync with hwint.c implementation. Index: gcc/hwint.h =================================================================== --- gcc/hwint.h 2018-05-02 08:38:14.433364094 +0100 +++ gcc/hwint.h 2018-07-30 12:21:39.204235940 +0100 @@ -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