diff --git a/hwy/ops/wasm_128-inl.h b/hwy/ops/wasm_128-inl.h index 67175d949c..b6d3aa8d3e 100644 --- a/hwy/ops/wasm_128-inl.h +++ b/hwy/ops/wasm_128-inl.h @@ -2716,14 +2716,16 @@ template HWY_INLINE uint64_t BitsFromMask(hwy::SizeTag<1> /*tag*/, const Mask128 mask) { constexpr uint64_t kMagic = 0x103070F1F3F80ULL; - return (wasm_i64x2_extract_lane(mask.raw, 0) * kMagic) >> 56; + return (static_cast(wasm_i64x2_extract_lane(mask.raw, 0)) * + kMagic) >> + 56; } // 32-bit or less: need masking template HWY_INLINE uint64_t BitsFromMask(hwy::SizeTag<1> /*tag*/, const Mask128 mask) { - uint64_t bytes = wasm_i64x2_extract_lane(mask.raw, 0); + uint64_t bytes = static_cast(wasm_i64x2_extract_lane(mask.raw, 0)); // Clear potentially undefined bytes. bytes &= (1ULL << (N * 8)) - 1; constexpr uint64_t kMagic = 0x103070F1F3F80ULL; diff --git a/hwy/tests/mask_test.cc b/hwy/tests/mask_test.cc index 964dfedd45..90b89d83bb 100644 --- a/hwy/tests/mask_test.cc +++ b/hwy/tests/mask_test.cc @@ -59,7 +59,7 @@ struct TestFirstN { const RebindToSigned di; using TI = TFromD; const size_t max_len = - static_cast(HWY_MIN(LimitsMax(), LimitsMax())); + HWY_MIN(static_cast(LimitsMax()), LimitsMax()); for (size_t len = 0; len <= HWY_MIN(2 * N, max_len); ++len) { const auto expected =