[libc-commits] [libc] [libc] Don't declare vector_size types that cannot be compiled (PR #221119)
Roland McGrath via libc-commits
libc-commits at lists.llvm.org
Mon Sep 14 11:48:23 PDT 2026
================
@@ -87,6 +92,7 @@
#if defined(__ARM_NEON)
#define LIBC_TARGET_CPU_HAS_ARM_NEON
+#define LIBC_TARGET_CPU_GENERIC_VECTOR_SIZE_MAX 512
----------------
frobtech wrote:
No, because for those machines these are the only cases that define it.
The `#undef` for the x86 cases are because there are sequential clauses expected to apply in turn for x86.
For each machine, if the conditions get more complicated then we'd adjust how things are defined. But using `#undef` this way a priori would risk masking unintended corners that without it will be caught as redefinition errors forcing us to look closely at exactly how it all fits together.
https://github.com/llvm/llvm-project/pull/221119
More information about the libc-commits
mailing list