News for hackers. Stuff that matters.
Re:Comparing Parallel Rust and C++ by mkbosmans on Friday November 08, 2019 @03:50PM (#21486589)
What are you talking about? Intrinsics don't force the compiler to use a specific instruction. It's not even a 1:1 mapping.

I think all compilers will fuse separate add and mul instrinsics to fmadd.

Both GCC and Clang will convert the _mm256_div_ps to a vmulps. GCC calculates the scaling factor by combining vsqrtps and vrcpps. Clang will emit a vrsqrtps instruction, but as that has only 12 bits of guaranteed accuracy, it fixes the result up before using it to scale x, y and z.

https://godbolt.org/z/rG2rH8

There are no comments on this comment yet.