It is possible to use gcc with short vector math library (libmvec) with -ftree-vectorize and -ffast-math. I want to ask how to use libmvec with clang. I figure out there is an option -fveclib= for clang. But it does not accept -fveclib=libmvec.
It is possible to use gcc with short vector math library (libmvec) with -ftree-vectorize and -ffast-math. I want to ask how to use libmvec with clang. I figure out there is an option -fveclib= for clang. But it does not accept -fveclib=libmvec.
As of LLVM 12, you can use -fveclib=libmvec to force CLANG to use libmvec. If your code uses mathematical functions (sin, cos, exp, pow) you can experience a large improvement in performance.