--- a/source/blender/blenlib/intern/math_half.cc
+++ b/source/blender/blenlib/intern/math_half.cc
@@ -16,7 +16,7 @@
 #if (defined(__x86_64__) || defined(_M_X64))
 /* All AVX2 CPUs have F16C instructions, so use those if we're compiling for AVX2.
  * Otherwise use "manual" SSE2 4x-wide conversion. */
-#  if defined(__AVX2__)
+#  if defined(__AVX512__)
 #    define USE_HARDWARE_FP16_F16C
 #  else
 #    define USE_SSE2_FP16
