Skip to content

Missing builtin: __builtin_ia32_sqrtsd #4088

Closed
@bjacob

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));

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions