[clang] [X86][AVX10] Permit AVX512 options/features used together with AVX10 (PR #71318)
via cfe-commits
cfe-commits at lists.llvm.org
Sun Nov 12 05:52:50 PST 2023
ronlieb wrote:
> @ronlieb Do you have a reproducer for this problem? I just checked the definition of both intrinsics have `no-evex512` already, so shouldn't have such problem. You can use -mno-evex512 as workaround for the problem anyway.
here is a small reproducer , compile with
clang++ -c fd_log_scalar.cpp -mtune=skylake-avx512 -march=skylake-avx512 -D_CPU=avx512
produces error :
lib/clang/18/include/avx512fintrin.h:5493:41: error: always_inline function '_mm_setzero_pd' requires target feature 'evex512', but would be inlined into function '_mm_getexp_sd' that is compiled without support for 'evex512'
5493 | (__v2df) __B, (__v2df) _mm_setzero_pd(), (__mmask8) -1, _MM_FROUND_CUR_DIRECTION);
| ^
1 error generated.
#include <immintrin.h>
#if !(defined _CPU)
#error: please define _CPU - specific suffix to a function name
#endif
extern "C" double log_d_scalar(double);
double __attribute__ ((noinline)) log_d_scalar(double a_input)
{
__m128d va, vm, ve, vb;
double a, m, e, b, t;
long long mu, eu;
#ifdef __AVX512F__
va = _mm_set_sd(a_input);
vm = _mm_getmant_sd(va, va, _MM_MANT_NORM_p75_1p5, _MM_MANT_SIGN_nan);
ve = _mm_getexp_sd(va, va);
vb = _mm_getexp_sd(vm, vm);
ve = _mm_sub_sd(ve, vb);
m = _mm_cvtsd_f64(vm);
e = _mm_cvtsd_f64(ve);
#endif
return m + e;
}
https://github.com/llvm/llvm-project/pull/71318
More information about the cfe-commits
mailing list