|
1 |
| -From 82f597cf81b169b0e72a576ac8751f598c059c48 Mon Sep 17 00:00:00 2001 |
| 1 | +From b742f03694b920cc14400727d54424e8e1b60928 Mon Sep 17 00:00:00 2001 |
2 | 2 |
|
3 | 3 | Date: Thu, 18 Nov 2021 19:28:40 +0100
|
4 | 4 | Subject: [PATCH] Disable unsupported tests
|
5 | 5 |
|
6 | 6 | ---
|
7 | 7 | crates/core_simd/src/elements/int.rs | 8 ++++++++
|
8 | 8 | crates/core_simd/src/elements/uint.rs | 4 ++++
|
9 |
| - crates/core_simd/src/masks/full_masks.rs | 9 +++++++++ |
| 9 | + crates/core_simd/src/masks/full_masks.rs | 6 ++++++ |
10 | 10 | crates/core_simd/src/vector.rs | 2 ++
|
11 |
| - crates/core_simd/tests/masks.rs | 2 ++ |
12 |
| - 5 files changed, 25 insertions(+) |
| 11 | + crates/core_simd/tests/masks.rs | 3 --- |
| 12 | + 5 files changed, 20 insertions(+), 3 deletions(-) |
13 | 13 |
|
14 | 14 | diff --git a/crates/core_simd/src/elements/int.rs b/crates/core_simd/src/elements/int.rs
|
15 | 15 | index 9b8c37e..ea95f08 100644
|
@@ -116,52 +116,35 @@ index 21e7e76..0d6dee2 100644
|
116 | 116 | #[inline]
|
117 | 117 | fn reduce_sum(self) -> Self::Scalar {
|
118 | 118 | diff --git a/crates/core_simd/src/masks/full_masks.rs b/crates/core_simd/src/masks/full_masks.rs
|
119 |
| -index adf0fcb..5b10292 100644 |
| 119 | +index adf0fcb..e7e657e 100644 |
120 | 120 | --- a/crates/core_simd/src/masks/full_masks.rs
|
121 | 121 | +++ b/crates/core_simd/src/masks/full_masks.rs
|
122 |
| -@@ -150,6 +150,7 @@ where |
| 122 | +@@ -180,6 +180,7 @@ where |
123 | 123 | super::Mask<T, LANES>: ToBitMaskArray,
|
124 | 124 | [(); <super::Mask<T, LANES> as ToBitMaskArray>::BYTES]: Sized,
|
125 | 125 | {
|
126 | 126 | + /*
|
127 | 127 | assert_eq!(<super::Mask<T, LANES> as ToBitMaskArray>::BYTES, N);
|
128 | 128 |
|
129 | 129 | // Safety: N is the correct bitmask size
|
130 |
| -@@ -170,6 +171,8 @@ where |
131 |
| - |
132 |
| - bitmask |
133 |
| - } |
134 |
| -+ */ |
135 |
| -+ panic!(); |
136 |
| - } |
137 |
| - |
138 |
| - #[cfg(feature = "generic_const_exprs")] |
139 |
| -@@ -209,6 +212,7 @@ where |
140 |
| - where |
141 |
| - super::Mask<T, LANES>: ToBitMask<BitMask = U>, |
142 |
| - { |
143 |
| -+ /* |
144 |
| - // Safety: U is required to be the appropriate bitmask type |
145 |
| - let bitmask: U = unsafe { intrinsics::simd_bitmask(self.0) }; |
146 |
| - |
147 |
| -@@ -218,6 +222,8 @@ where |
148 |
| - } else { |
149 |
| - bitmask |
| 130 | +@@ -202,6 +203,8 @@ where |
| 131 | + Self::splat(false).to_int(), |
| 132 | + )) |
150 | 133 | }
|
151 | 134 | + */
|
152 | 135 | + panic!();
|
153 | 136 | }
|
154 | 137 |
|
155 | 138 | #[inline]
|
156 |
| -@@ -225,6 +231,7 @@ where |
| 139 | +@@ -225,6 +228,7 @@ where |
157 | 140 | where
|
158 | 141 | super::Mask<T, LANES>: ToBitMask<BitMask = U>,
|
159 | 142 | {
|
160 | 143 | + /*
|
161 | 144 | // LLVM assumes bit order should match endianness
|
162 | 145 | let bitmask = if cfg!(target_endian = "big") {
|
163 | 146 | bitmask.reverse_bits(LANES)
|
164 |
| -@@ -240,6 +247,8 @@ where |
| 147 | +@@ -240,6 +244,8 @@ where |
165 | 148 | Self::splat(false).to_int(),
|
166 | 149 | ))
|
167 | 150 | }
|
@@ -191,24 +174,30 @@ index e8e8f68..7173c24 100644
|
191 | 174 |
|
192 | 175 | impl<T, const LANES: usize> Copy for Simd<T, LANES>
|
193 | 176 | diff --git a/crates/core_simd/tests/masks.rs b/crates/core_simd/tests/masks.rs
|
194 |
| -index 673d0db..0d68b01 100644 |
| 177 | +index 673d0db..3ebfcd1 100644 |
195 | 178 | --- a/crates/core_simd/tests/masks.rs
|
196 | 179 | +++ b/crates/core_simd/tests/masks.rs
|
197 |
| -@@ -59,6 +59,7 @@ macro_rules! test_mask_api { |
198 |
| - assert!(!v.all()); |
| 180 | +@@ -78,7 +78,6 @@ macro_rules! test_mask_api { |
| 181 | + let mask = core_simd::Mask::<$type, 16>::from_array(values); |
| 182 | + let bitmask = mask.to_bitmask(); |
| 183 | + assert_eq!(bitmask, 0b1000001101001001); |
| 184 | +- assert_eq!(core_simd::Mask::<$type, 16>::from_bitmask(bitmask), mask); |
199 | 185 | }
|
200 | 186 |
|
201 |
| -+ /* |
202 | 187 | #[test]
|
203 |
| - fn roundtrip_int_conversion() { |
204 |
| - let values = [true, false, false, true, false, false, true, false]; |
205 |
| -@@ -99,6 +100,7 @@ macro_rules! test_mask_api { |
| 188 | +@@ -91,13 +90,11 @@ macro_rules! test_mask_api { |
| 189 | + let mask = core_simd::Mask::<$type, 4>::from_array(values); |
| 190 | + let bitmask = mask.to_bitmask(); |
| 191 | + assert_eq!(bitmask, 0b1000); |
| 192 | +- assert_eq!(core_simd::Mask::<$type, 4>::from_bitmask(bitmask), mask); |
| 193 | + |
| 194 | + let values = [true, false]; |
| 195 | + let mask = core_simd::Mask::<$type, 2>::from_array(values); |
| 196 | + let bitmask = mask.to_bitmask(); |
206 | 197 | assert_eq!(bitmask, 0b01);
|
207 |
| - assert_eq!(core_simd::Mask::<$type, 2>::from_bitmask(bitmask), mask); |
| 198 | +- assert_eq!(core_simd::Mask::<$type, 2>::from_bitmask(bitmask), mask); |
208 | 199 | }
|
209 |
| -+ */ |
210 | 200 |
|
211 | 201 | #[test]
|
212 |
| - fn cast() { |
213 | 202 | --
|
214 | 203 | 2.25.1
|
0 commit comments