From 218caa410aa38c29984be31a5229b9fa717560ee Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Wed, 17 Apr 2024 14:19:13 +0200 Subject: Merging upstream version 1.68.2+dfsg1. Signed-off-by: Daniel Baumann --- src/test/ui/simd/simd-bitmask.rs | 52 ---------------------------------------- 1 file changed, 52 deletions(-) delete mode 100644 src/test/ui/simd/simd-bitmask.rs (limited to 'src/test/ui/simd/simd-bitmask.rs') diff --git a/src/test/ui/simd/simd-bitmask.rs b/src/test/ui/simd/simd-bitmask.rs deleted file mode 100644 index 14ee2e741..000000000 --- a/src/test/ui/simd/simd-bitmask.rs +++ /dev/null @@ -1,52 +0,0 @@ -//run-pass -//ignore-endian-big behavior of simd_select_bitmask is endian-specific -#![feature(repr_simd, platform_intrinsics)] - -extern "platform-intrinsic" { - fn simd_bitmask(v: T) -> U; - fn simd_select_bitmask(m: T, a: U, b: U) -> U; -} - -#[derive(Copy, Clone)] -#[repr(simd)] -struct Simd([T; N]); - -fn main() { - unsafe { - let v = Simd::([-1, 0, -1, 0]); - let i: u8 = simd_bitmask(v); - let a: [u8; 1] = simd_bitmask(v); - - assert_eq!(i, 0b0101); - assert_eq!(a, [0b0101]); - - let v = Simd::([0, 0, -1, -1, 0, 0, 0, 0, 0, 0, 0, 0, -1, 0, -1, 0]); - let i: u16 = simd_bitmask(v); - let a: [u8; 2] = simd_bitmask(v); - - assert_eq!(i, 0b0101000000001100); - assert_eq!(a, [0b1100, 0b01010000]); - } - - unsafe { - let a = Simd::([0, 1, 2, 3, 4, 5, 6, 7]); - let b = Simd::([8, 9, 10, 11, 12, 13, 14, 15]); - let e = [0, 9, 2, 11, 12, 13, 14, 15]; - - let r = simd_select_bitmask(0b0101u8, a, b); - assert_eq!(r.0, e); - - let r = simd_select_bitmask([0b0101u8], a, b); - assert_eq!(r.0, e); - - let a = Simd::([0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15]); - let b = Simd::([16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31]); - let e = [16, 17, 2, 3, 20, 21, 22, 23, 24, 25, 26, 27, 12, 29, 14, 31]; - - let r = simd_select_bitmask(0b0101000000001100u16, a, b); - assert_eq!(r.0, e); - - let r = simd_select_bitmask([0b1100u8, 0b01010000u8], a, b); - assert_eq!(r.0, e); - } -} -- cgit v1.2.3