Closed
Description
GCC-compatible compilers support various builtins that give access to specific instructions not otherwise covered by standard intrinsics.
__builtin_ia32_sqrtsd is an example. It gives access to scalar (non-SIMD) square-root instruction SQRTSD.
It's used by Eigen, so lack of support currently means that Eigen has to special-case Emscripten.
Testcase:
include <xmmintrin.h>
int main() {
double x = 0;
__builtin_ia32_sqrtsd(_mm_set_sd(x));
}
Result:
/usr/local/google/home/benoitjacob/vrac/missing-builtin-sqrt.cc:5:3: error: use of undeclared identifier '__builtin_ia32_sqrtsd'
__builtin_ia32_sqrtsd(_mm_set_sd(x));