[PATCH] D132342: [X86][AVX512FP16] Relax limitation to AVX512FP16 intrinsics. NFCI
Phoebe Wang via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Mon Aug 22 05:57:02 PDT 2022
pengfei updated this revision to Diff 454475.
pengfei added a comment.
Rebased on D132372 <https://reviews.llvm.org/D132372>.
> Should the const change be a separate patch? They feel unrelated.
Done. The change results in lit test fails.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D132342/new/
https://reviews.llvm.org/D132342
Files:
clang/lib/Headers/avx512fp16intrin.h
clang/lib/Headers/avx512vlfp16intrin.h
clang/lib/Headers/immintrin.h
Index: clang/lib/Headers/immintrin.h
===================================================================
--- clang/lib/Headers/immintrin.h
+++ clang/lib/Headers/immintrin.h
@@ -214,17 +214,13 @@
#include <avx512pfintrin.h>
#endif
-/*
- * FIXME: _Float16 type is legal only when HW support float16 operation.
- * We use __AVX512FP16__ to identify if float16 is supported or not, so
- * when float16 is not supported, the related header is not included.
- *
- */
-#if defined(__AVX512FP16__)
+#if !(defined(_MSC_VER) || defined(__SCE__)) || __has_feature(modules) || \
+ defined(__AVX512FP16__)
#include <avx512fp16intrin.h>
#endif
-#if defined(__AVX512FP16__) && defined(__AVX512VL__)
+#if !(defined(_MSC_VER) || defined(__SCE__)) || __has_feature(modules) || \
+ (defined(__AVX512VL__) && defined(__AVX512FP16__))
#include <avx512vlfp16intrin.h>
#endif
Index: clang/lib/Headers/avx512vlfp16intrin.h
===================================================================
--- clang/lib/Headers/avx512vlfp16intrin.h
+++ clang/lib/Headers/avx512vlfp16intrin.h
@@ -11,6 +11,8 @@
"Never use <avx512vlfp16intrin.h> directly; include <immintrin.h> instead."
#endif
+#ifdef __SSE2__
+
#ifndef __AVX512VLFP16INTRIN_H
#define __AVX512VLFP16INTRIN_H
@@ -2066,3 +2068,4 @@
#undef __DEFAULT_FN_ATTRS256
#endif
+#endif
Index: clang/lib/Headers/avx512fp16intrin.h
===================================================================
--- clang/lib/Headers/avx512fp16intrin.h
+++ clang/lib/Headers/avx512fp16intrin.h
@@ -10,6 +10,8 @@
#error "Never use <avx512fp16intrin.h> directly; include <immintrin.h> instead."
#endif
+#ifdef __SSE2__
+
#ifndef __AVX512FP16INTRIN_H
#define __AVX512FP16INTRIN_H
@@ -3347,3 +3349,4 @@
#undef __DEFAULT_FN_ATTRS512
#endif
+#endif
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D132342.454475.patch
Type: text/x-patch
Size: 1800 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20220822/b8465de5/attachment.bin>
More information about the cfe-commits
mailing list