[PATCH] D89105: [X86] Support Intel avxvnni

Pengfei Wang via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Oct 22 22:52:51 PDT 2020


pengfei added inline comments.


================
Comment at: clang/lib/Headers/avxvnniintrin.h:32
+#include "commonvnniintrin.h"
+
+/* Intrinsics with _avx_ prefix are for compatibility with msvc. */
----------------
craig.topper wrote:
> pengfei wrote:
> > Maybe we can move `commonvnniintrin.h` to `immintrin.h`. Then we don't have a different layout.
> > ```
> > #if !(defined(_MSC_VER) || defined(__SCE__)) || __has_feature(modules) ||      \
> >      defined(__AVX512VNNI__) || (defined(__AVX512VL__) && defined(__AVX512VNNI__))
> > #include <commonvnniintrin.h>
> > #endif
> > ```
> gcc appears to have just put the common intrinsics in avxvnniintrin.h. Why can't we do that?
I asked GCC guys. They don't use macro like `defined(__AVXVNNI__)`. If we put it in avxvnniintrin.h, we need handle macro `AVX512VNNI` in avxvnniintrin.h. It's bit confused.

@LiuChen3 I meant `__AVXVNNI__` for the first `__AVX512VNNI__` in last comment.


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D89105/new/

https://reviews.llvm.org/D89105



More information about the llvm-commits mailing list