]> git.lizzy.rs Git - rust.git/blob - patches/0001-portable-simd-Disable-unsupported-tests.patch
Sync from rust c7dbe7a830100c70d59994fd940bf75bb6e39b39
[rust.git] / patches / 0001-portable-simd-Disable-unsupported-tests.patch
1 From 6bfce5dc2cbf834c74dbccb7538adc08c6eb57e7 Mon Sep 17 00:00:00 2001
2 From: bjorn3 <bjorn3@users.noreply.github.com>
3 Date: Sun, 25 Jul 2021 18:39:31 +0200
4 Subject: [PATCH] Disable unsupported tests
5
6 ---
7  crates/core_simd/src/vector.rs        |  2 ++
8  crates/core_simd/src/math.rs         |  4 ++++
9  crates/core_simd/tests/masks.rs      | 12 ------------
10  crates/core_simd/tests/ops_macros.rs |  6 ++++++
11  crates/core_simd/tests/round.rs      |  2 ++
12  6 files changed, 15 insertions(+), 13 deletions(-)
13
14 diff --git a/crates/core_simd/src/vector.rs b/crates/core_simd/src/vector.rs
15 index 25c5309..2b3d819 100644
16 --- a/crates/core_simd/src/vector.rs
17 +++ b/crates/core_simd/src/vector.rs
18 @@ -22,6 +22,7 @@ where
19          self.0
20      }
21  
22 +    /*
23      /// SIMD gather: construct a SIMD vector by reading from a slice, using potentially discontiguous indices.
24      /// If an index is out of bounds, that lane instead selects the value from the "or" vector.
25      /// ```
26 @@ -150,6 +151,7 @@ where
27              // Cleared ☢️ *mut T Zone
28          }
29      }
30 +    */
31  }
32  
33  impl<T, const LANES: usize> Copy for Simd<T, LANES>
34 diff --git a/crates/core_simd/src/math.rs b/crates/core_simd/src/math.rs
35 index 7290a28..e394730 100644
36 --- a/crates/core_simd/src/math.rs
37 +++ b/crates/core_simd/src/math.rs
38 @@ -2,6 +2,7 @@ macro_rules! impl_uint_arith {
39      ($($ty:ty),+) => {
40          $( impl<const LANES: usize> Simd<$ty, LANES> where LaneCount<LANES>: SupportedLaneCount {
41  
42 +            /*
43              /// Lanewise saturating add.
44              ///
45              /// # Examples
46 @@ -38,6 +39,7 @@ macro_rules! impl_uint_arith {
47              pub fn saturating_sub(self, second: Self) -> Self {
48                  unsafe { crate::intrinsics::simd_saturating_sub(self, second) }
49              }
50 +            */
51          })+
52      }
53  }
54 @@ -46,6 +48,7 @@ macro_rules! impl_int_arith {
55      ($($ty:ty),+) => {
56          $( impl<const LANES: usize> Simd<$ty, LANES> where LaneCount<LANES>: SupportedLaneCount {
57  
58 +            /*
59              /// Lanewise saturating add.
60              ///
61              /// # Examples
62 @@ -141,6 +144,7 @@ macro_rules! impl_int_arith {
63              pub fn saturating_neg(self) -> Self {
64                  Self::splat(0).saturating_sub(self)
65              }
66 +            */
67          })+
68      }
69  }
70 diff --git a/crates/core_simd/tests/masks.rs b/crates/core_simd/tests/masks.rs
71 index 61d8e44..2bccae2 100644
72 --- a/crates/core_simd/tests/masks.rs
73 +++ b/crates/core_simd/tests/masks.rs
74 @@ -67,18 +67,6 @@ macro_rules! test_mask_api {
75                  assert_eq!(int.to_array(), [-1, 0, 0, -1, 0, 0, -1, 0]);
76                  assert_eq!(core_simd::Mask::<$type, 8>::from_int(int), mask);
77              }
78 -
79 -            #[test]
80 -            fn roundtrip_bitmask_conversion() {
81 -                let values = [
82 -                    true, false, false, true, false, false, true, false,
83 -                    true, true, false, false, false, false, false, true,
84 -                ];
85 -                let mask = core_simd::Mask::<$type, 16>::from_array(values);
86 -                let bitmask = mask.to_bitmask();
87 -                assert_eq!(bitmask, [0b01001001, 0b10000011]);
88 -                assert_eq!(core_simd::Mask::<$type, 16>::from_bitmask(bitmask), mask);
89 -            }
90          }
91      }
92  }
93 diff --git a/crates/core_simd/tests/ops_macros.rs b/crates/core_simd/tests/ops_macros.rs
94 index cb39e73..fc0ebe1 100644
95 --- a/crates/core_simd/tests/ops_macros.rs
96 +++ b/crates/core_simd/tests/ops_macros.rs
97 @@ -435,6 +435,7 @@ macro_rules! impl_float_tests {
98                      )
99                  }
100  
101 +                /*
102                  fn mul_add<const LANES: usize>() {
103                      test_helpers::test_ternary_elementwise(
104                          &Vector::<LANES>::mul_add,
105 @@ -442,6 +443,7 @@ macro_rules! impl_float_tests {
106                          &|_, _, _| true,
107                      )
108                  }
109 +                */
110  
111                  fn recip<const LANES: usize>() {
112                      test_helpers::test_unary_elementwise(
113 @@ -581,6 +585,7 @@ macro_rules! impl_float_tests {
114                      });
115                  }
116  
117 +                /*
118                  fn horizontal_max<const LANES: usize>() {
119                      test_helpers::test_1(&|x| {
120                          let vmax = Vector::<LANES>::from_array(x).horizontal_max();
121 @@ -604,6 +609,7 @@ macro_rules! impl_float_tests {
122                          Ok(())
123                      });
124                  }
125 +                */
126              }
127  
128              #[cfg(feature = "std")]
129 diff --git a/crates/core_simd/tests/round.rs b/crates/core_simd/tests/round.rs
130 index 37044a7..4cdc6b7 100644
131 --- a/crates/core_simd/tests/round.rs
132 +++ b/crates/core_simd/tests/round.rs
133 @@ -25,6 +25,7 @@ macro_rules! float_rounding_test {
134                      )
135                  }
136  
137 +                /*
138                  fn round<const LANES: usize>() {
139                      test_helpers::test_unary_elementwise(
140                          &Vector::<LANES>::round,
141 @@ -32,6 +33,7 @@ macro_rules! float_rounding_test {
142                          &|_| true,
143                      )
144                  }
145 +                */
146  
147                  fn trunc<const LANES: usize>() {
148                      test_helpers::test_unary_elementwise(
149 -- 
150 2.26.2.7.g19db9cfb68
151