[libc-commits] [libc] 1973270 - [libc] suppress string warning in case intrinsics are defined as macros (#117640)

via libc-commits libc-commits at lists.llvm.org
Mon Nov 25 15:05:25 PST 2024


Author: Schrodinger ZHU Yifan
Date: 2024-11-25T18:05:22-05:00
New Revision: 1973270fc66680e6894c3ae9395a7e07e7b4d43c

URL: https://github.com/llvm/llvm-project/commit/1973270fc66680e6894c3ae9395a7e07e7b4d43c
DIFF: https://github.com/llvm/llvm-project/commit/1973270fc66680e6894c3ae9395a7e07e7b4d43c.diff

LOG: [libc] suppress string warning in case intrinsics are defined as macros (#117640)

Added: 
    

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

Removed: 
    


################################################################################
diff  --git a/libc/src/string/memory_utils/op_x86.h b/libc/src/string/memory_utils/op_x86.h
index ab694e25fe0fe1..309610e4ad6307 100644
--- a/libc/src/string/memory_utils/op_x86.h
+++ b/libc/src/string/memory_utils/op_x86.h
@@ -29,12 +29,15 @@
 // Define fake functions to prevent the compiler from failing on undefined
 // functions in case the CPU extension is not present.
 #if !defined(__AVX512BW__) && (defined(_MSC_VER) || defined(__SCE__))
+#undef _mm512_cmpneq_epi8_mask
 #define _mm512_cmpneq_epi8_mask(A, B) 0
 #endif
 #if !defined(__AVX2__) && (defined(_MSC_VER) || defined(__SCE__))
+#undef _mm256_movemask_epi8
 #define _mm256_movemask_epi8(A) 0
 #endif
 #if !defined(__SSE2__) && (defined(_MSC_VER) || defined(__SCE__))
+#undef _mm_movemask_epi8
 #define _mm_movemask_epi8(A) 0
 #endif
 


        


More information about the libc-commits mailing list