From 115ce93562ab76f90a2509bf0640bc7df6b2d48f Mon Sep 17 00:00:00 2001 From: Rajeev Misra Date: Thu, 23 Aug 2018 20:58:48 -0700 Subject: [PATCH] bit_util: Don't use __builtin_clz on s390x There's an optimizer bug upstream that results in test failures; reported at https://bugzilla.redhat.com/show_bug.cgi?id=1619354. This works around the failure reported at https://github.com/jemalloc/jemalloc/issues/1307. --- include/jemalloc/internal/bit_util.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/jemalloc/internal/bit_util.h b/include/jemalloc/internal/bit_util.h index 27a8c97d..8c59c39e 100644 --- a/include/jemalloc/internal/bit_util.h +++ b/include/jemalloc/internal/bit_util.h @@ -93,7 +93,7 @@ pow2_ceil_u64(uint64_t x) { BIT_UTIL_INLINE uint32_t pow2_ceil_u32(uint32_t x) { -#if (defined(__i386__) || defined(JEMALLOC_HAVE_BUILTIN_CLZ)) +#if ((defined(__i386__) || defined(JEMALLOC_HAVE_BUILTIN_CLZ)) && (!defined(__s390__))) if(unlikely(x <= 1)) { return x; }