Re: [PATCH 1/2] configure: avx2 and avx512f detection for clang

2020-07-22 Thread Thomas Huth
On 23/07/2020 08.04, Shu-Chun Weng wrote: > Do we have the flexibility to do that for util/bufferiszero.c as well? > Otherwise, we are using different mechanisms to detect (compile test.c > with -mavx2) and actually use (GCC pragma & __attribute__((target(*) > the feature in production. That's

Re: [PATCH 1/2] configure: avx2 and avx512f detection for clang

2020-07-22 Thread Shu-Chun Weng
Do we have the flexibility to do that for util/bufferiszero.c as well? Otherwise, we are using different mechanisms to detect (compile test.c with -mavx2) and actually use (GCC pragma & __attribute__((target(*) the feature in production. Shu-Chun On Wed, Jul 22, 2020 at 9:55 PM Thomas Huth w

Re: [PATCH 1/2] configure: avx2 and avx512f detection for clang

2020-07-22 Thread Thomas Huth
On 23/07/2020 02.27, Shu-Chun Weng wrote: > Since clang does not support "#pragma GCC", the instruction sets are > always disabled. In this change, we > > 1. wrap "#pragma GCC" inside "#ifndef __clang__", > 2. only retain them around "#include <{e,i,s}mmintrin.h>" to work > around gcc bug, >

[PATCH 1/2] configure: avx2 and avx512f detection for clang

2020-07-22 Thread Shu-Chun Weng
Since clang does not support "#pragma GCC", the instruction sets are always disabled. In this change, we 1. wrap "#pragma GCC" inside "#ifndef __clang__", 2. only retain them around "#include <{e,i,s}mmintrin.h>" to work around gcc bug, 3. and annotate each function with `__attribute__((tar