[libc-commits] [PATCH] D154256: [libc] Add missing cast in x86 big_endian_cmp_mask

Roland McGrath via Phabricator via libc-commits libc-commits at lists.llvm.org
Fri Jun 30 14:16:26 PDT 2023


This revision was landed with ongoing or failed builds.
This revision was automatically updated to reflect the committed changes.
Closed by commit rGdbd38b121920: [libc] Add missing cast in x86 big_endian_cmp_mask (authored by mcgrathr).

Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D154256/new/

https://reviews.llvm.org/D154256

Files:
  libc/src/string/memory_utils/op_x86.h


Index: libc/src/string/memory_utils/op_x86.h
===================================================================
--- libc/src/string/memory_utils/op_x86.h
+++ libc/src/string/memory_utils/op_x86.h
@@ -129,7 +129,7 @@
                                               8, 9, 10, 11, 12, 13, 14, 15));
 }
 LIBC_INLINE uint16_t big_endian_cmp_mask(__m128i max, __m128i value) {
-  return _mm_movemask_epi8(bytewise_reverse(_mm_cmpeq_epi8(max, value)));
+  return static_cast<uint16_t>(_mm_movemask_epi8(bytewise_reverse(_mm_cmpeq_epi8(max, value))));
 }
 template <> LIBC_INLINE bool eq<__m128i>(CPtr p1, CPtr p2, size_t offset) {
   const auto a = load<__m128i>(p1, offset);


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D154256.536425.patch
Type: text/x-patch
Size: 669 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/libc-commits/attachments/20230630/537ff5d3/attachment.bin>


More information about the libc-commits mailing list