Skip to content

Commit 31ea1cf

Browse files
Bogdan Graurcopybara-github
authored andcommitted
Adds HWY_HAVE_EVEX512 define to allow specifying from outside if EVEX512 is
supported by the compiler or not. PiperOrigin-RevId: 810050037
1 parent 6cb0bcf commit 31ea1cf

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

hwy/ops/set_macros-inl.h

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -141,10 +141,18 @@
141141
#define HWY_TARGET_STR_AVX2 \
142142
HWY_TARGET_STR_SSE4 ",avx,avx2" HWY_TARGET_STR_BMI2_FMA HWY_TARGET_STR_F16C
143143

144+
#ifndef HWY_HAVE_EVEX512
144145
// evex512 has been removed from clang 22, see
145146
// https://github.com/llvm/llvm-project/pull/157034
146147
#if (1400 <= HWY_COMPILER_GCC_ACTUAL && HWY_COMPILER_GCC_ACTUAL < 1600) || \
147148
(1800 <= HWY_COMPILER_CLANG && HWY_COMPILER_CLANG < 2200)
149+
#define HWY_HAVE_EVEX512 1
150+
#else
151+
#define HWY_HAVE_EVEX512 0
152+
#endif
153+
#endif
154+
155+
#if (HWY_HAVE_EVEX512 == 1)
148156
#define HWY_TARGET_STR_AVX3_VL512 ",evex512"
149157
#else
150158
#define HWY_TARGET_STR_AVX3_VL512

0 commit comments

Comments
 (0)