[PATCH] D90822: [X86] use macros to split GFNI intrinsics into different kinds

2020-11-06 Thread Freddy, Ye via Phabricator via cfe-commits
This revision was landed with ongoing or failed builds. This revision was automatically updated to reflect the committed changes. Closed by commit rG5e312e004197: [X86] use macros to split GFNI intrinsics into different kinds (authored by FreddyYe). Repository: rG LLVM Github Monorepo CHANGES

[PATCH] D90822: [X86] use macros to split GFNI intrinsics into different kinds

2020-11-05 Thread Pengfei Wang via Phabricator via cfe-commits
pengfei accepted this revision. pengfei added a comment. LGTM. Thanks. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D90822/new/ https://reviews.llvm.org/D90822 ___ cfe-commits mailing list cfe-commits@li

[PATCH] D90822: [X86] use macros to split GFNI intrinsics into different kinds

2020-11-05 Thread Craig Topper via Phabricator via cfe-commits
craig.topper accepted this revision. craig.topper added a comment. This revision is now accepted and ready to land. LGTM Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D90822/new/ https://reviews.llvm.org/D90822 _

[PATCH] D90822: [X86] use macros to split GFNI intrinsics into different kinds

2020-11-05 Thread Freddy, Ye via Phabricator via cfe-commits
FreddyYe updated this revision to Diff 303087. FreddyYe marked an inline comment as done. FreddyYe added a comment. Refine Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D90822/new/ https://reviews.llvm.org/D90822 Files: clang/lib/Headers/gfniintr

[PATCH] D90822: [X86] use macros to split GFNI intrinsics into different kinds

2020-11-05 Thread Freddy, Ye via Phabricator via cfe-commits
FreddyYe marked 3 inline comments as done. FreddyYe added inline comments. Comment at: clang/lib/Headers/gfniintrin.h:131-138 #define _mm512_mask_gf2p8affine_epi64_epi8(S, U, A, B, I) \ (__m512i)__builtin_ia32_selectb_512((__mmask64)(U), \

[PATCH] D90822: [X86] use macros to split GFNI intrinsics into different kinds

2020-11-05 Thread Pengfei Wang via Phabricator via cfe-commits
pengfei added inline comments. Comment at: clang/lib/Headers/gfniintrin.h:104-111 #define _mm512_mask_gf2p8affineinv_epi64_epi8(S, U, A, B, I) \ (__m512i)__builtin_ia32_selectb_512((__mmask64)(U), \ (__v64qi)_mm512_gf2p8affineinv_epi64_ep

[PATCH] D90822: [X86] use macros to split GFNI intrinsics into different kinds

2020-11-05 Thread Freddy, Ye via Phabricator via cfe-commits
FreddyYe updated this revision to Diff 303073. FreddyYe added a comment. Reorganize intrinsic orders to avoid using nested macros. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D90822/new/ https://reviews.llvm.org/D90822 Files: clang/lib/Headers/

[PATCH] D90822: [X86] use macros to split GFNI intrinsics into different kinds

2020-11-05 Thread Pengfei Wang via Phabricator via cfe-commits
pengfei added inline comments. Comment at: clang/lib/Headers/gfniintrin.h:24 +#ifdef __AVXINTRIN_H +#ifdef __AVX512BWINTRIN_H +#ifdef __AVX512VLINTRIN_H `__AVX512VLBWINTRIN_H` is better. Comment at: clang/lib/Headers/gfniintrin.h:52 U,

[PATCH] D90822: [X86] use macros to split GFNI intrinsics into different kinds

2020-11-04 Thread Freddy, Ye via Phabricator via cfe-commits
FreddyYe updated this revision to Diff 303047. FreddyYe added a comment. Use header file macros instead. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D90822/new/ https://reviews.llvm.org/D90822 Files: clang/lib/Headers/gfniintrin.h Index: clang

[PATCH] D90822: [X86] use macros to split GFNI intrinsics into different kinds

2020-11-04 Thread Pengfei Wang via Phabricator via cfe-commits
pengfei added a comment. In D90822#2375469 , @craig.topper wrote: > In D90822#2375463 , @FreddyYe wrote: > >> In D90822#2375423 , @pengfei wrote: >> >>> Craig's method sound

[PATCH] D90822: [X86] use macros to split GFNI intrinsics into different kinds

2020-11-04 Thread Craig Topper via Phabricator via cfe-commits
craig.topper added a comment. In D90822#2375463 , @FreddyYe wrote: > In D90822#2375423 , @pengfei wrote: > >> Craig's method sounds good. >> @FreddyYe , Why we check AVX512BW instead of AVX512F. I saw SDM says it >

[PATCH] D90822: [X86] use macros to split GFNI intrinsics into different kinds

2020-11-04 Thread Pengfei Wang via Phabricator via cfe-commits
pengfei added a comment. In D90822#2375445 , @craig.topper wrote: > In D90822#2375425 , @pengfei wrote: > >> In D90822#2375423 , @pengfei wrote: >> >>> Craig's method sounds

[PATCH] D90822: [X86] use macros to split GFNI intrinsics into different kinds

2020-11-04 Thread Freddy, Ye via Phabricator via cfe-commits
FreddyYe added a comment. In D90822#2375423 , @pengfei wrote: > Craig's method sounds good. > @FreddyYe , Why we check AVX512BW instead of AVX512F. I saw SDM says it > depends on AVX512F. I was referring to the old implement and test case. Seems like a e

[PATCH] D90822: [X86] use macros to split GFNI intrinsics into different kinds

2020-11-04 Thread Craig Topper via Phabricator via cfe-commits
craig.topper added a comment. In D90822#2375425 , @pengfei wrote: > In D90822#2375423 , @pengfei wrote: > >> Craig's method sounds good. > > I think it may result in potential problem once we change the order of the

[PATCH] D90822: [X86] use macros to split GFNI intrinsics into different kinds

2020-11-04 Thread Pengfei Wang via Phabricator via cfe-commits
pengfei added a comment. In D90822#2375423 , @pengfei wrote: > Craig's method sounds good. I think it may result in potential problem once we change the order of them in immintrin.h, it should be better to use the first method. #if !(defined(_MSC_VER)

[PATCH] D90822: [X86] use macros to split GFNI intrinsics into different kinds

2020-11-04 Thread Pengfei Wang via Phabricator via cfe-commits
pengfei added a comment. Craig's method sounds good. @FreddyYe , Why we check AVX512BW instead of AVX512F. I saw SDM says it depends on AVX512F. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D90822/new/ https://reviews.llvm.org/D90822

[PATCH] D90822: [X86] use macros to split GFNI intrinsics into different kinds

2020-11-04 Thread Craig Topper via Phabricator via cfe-commits
craig.topper added a comment. In D90822#2375372 , @FreddyYe wrote: > The fails are all unknown type errors on Windows, since those typedefs are > declared in other header files. > The error message goes like: > > $ clang -march=tremont gfni.c > ..

[PATCH] D90822: [X86] use macros to split GFNI intrinsics into different kinds

2020-11-04 Thread Freddy, Ye via Phabricator via cfe-commits
FreddyYe added a comment. The fails are all unknown type errors on Windows, since those typedefs are declared in other header files. The error message goes like: $ clang -march=tremont gfni.c .. ...\lib\clang\12.0.0\include\gfniintrin.h:129:37: error: unknown type name '__mmask

[PATCH] D90822: [X86] use macros to split GFNI intrinsics into different kinds

2020-11-04 Thread Craig Topper via Phabricator via cfe-commits
craig.topper added a comment. What compilation failure do you get without this? The feature checks are compile time optimization for MSVC because windows.h includes intrin.h. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D90822/new/ https://reviews

[PATCH] D90822: [X86] use macros to split GFNI intrinsics into different kinds

2020-11-04 Thread Craig Topper via Phabricator via cfe-commits
craig.topper added inline comments. Comment at: clang/lib/Headers/gfniintrin.h:23 +#ifdef __AVX__ +#ifdef __AVX512BW__ This needs to be more like #if !(defined(_MSC_VER) || defined(__SCE__)) || __has_feature(modules) || \

[PATCH] D90822: [X86] use macros to split GFNI intrinsics into different kinds

2020-11-04 Thread Freddy, Ye via Phabricator via cfe-commits
FreddyYe created this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. FreddyYe requested review of this revision. Tremont microarchitecture only has GFNI(SSE) version, not AVX and AVX512 version. This patch is to avoid compiling fail on Windows when using -march=tr