Closed
Description
According to intel documentation the return type should be 64x4
but rustc expects a 8x32
Test case:
#![feature(platform_intrinsics)]
#![feature(repr_simd)]
#[repr(simd)]
struct u8x32(u8,u8,u8,u8,u8,u8,u8,u8,u8,u8,u8,u8,u8,u8,u8,u8,u8,u8,u8,u8,u8,u8,u8,u8,u8,u8,u8,u8,u8,u8,u8,u8,);
#[repr(simd)]
struct u64x4(u64,u64,u64,u64,);
extern "platform-intrinsic" {
fn x86_mm256_sad_epu8(x: u8x32, y: u8x32) -> u64x4;
}
fn main() {}
Compiler error:
error[E0442]: intrinsic return value has wrong type: found vector with length 4, expected length 32
--> src/main.rs:10:2
|
10 | fn x86_mm256_sad_epu8(x: u8x32, y: u8x32) -> u64x4;
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^