Handmade Hero»Forums»Code
55 posts
Intel intrinsics: LLVM <> MSVC
I noticed that LLVM is less strict about the vector types than MSVC by default. For example, it doesn't produce warnings or errors when you return a _m128 to a _m128i variable or vice versa. Is this an option you can turn on in llvm?
Mārtiņš Možeiko
2562 posts / 2 projects
Intel intrinsics: LLVM <> MSVC
Unfortunately no. Clang does same thing that GCC does for these vector types: https://gcc.gnu.org/onlinedocs/gcc/Vector-Extensions.html
It is possible to cast from one vector type to another, provided they are of the same size (in fact, you can also cast vectors to and from other datatypes of the same size).