]> git.lizzy.rs Git - rust.git/blob - compiler/rustc_codegen_cranelift/patches/0001-portable-simd-Disable-unsupported-tests.patch
Auto merge of #98203 - kckeiks:gather-body-owners-in-hir-item-queries, r=cjgillot
[rust.git] / compiler / rustc_codegen_cranelift / patches / 0001-portable-simd-Disable-unsupported-tests.patch
1 From 97c473937382a5b5858d9cce3c947855d23b2dc5 Mon Sep 17 00:00:00 2001
2 From: bjorn3 <bjorn3@users.noreply.github.com>
3 Date: Thu, 18 Nov 2021 19:28:40 +0100
4 Subject: [PATCH] Disable unsupported tests
5
6 ---
7  crates/core_simd/src/math.rs         | 6 ++++++
8  crates/core_simd/src/vector.rs       | 2 ++
9  crates/core_simd/tests/masks.rs      | 2 ++
10  crates/core_simd/tests/ops_macros.rs | 4 ++++
11  4 files changed, 14 insertions(+)
12
13 diff --git a/crates/core_simd/src/math.rs b/crates/core_simd/src/math.rs
14 index 2bae414..2f87499 100644
15 --- a/crates/core_simd/src/math.rs
16 +++ b/crates/core_simd/src/math.rs
17 @@ -5,6 +5,7 @@ macro_rules! impl_uint_arith {
18      ($($ty:ty),+) => {
19          $( impl<const LANES: usize> Simd<$ty, LANES> where LaneCount<LANES>: SupportedLaneCount {
20  
21 +            /*
22              /// Lanewise saturating add.
23              ///
24              /// # Examples
25 @@ -43,6 +44,7 @@ macro_rules! impl_uint_arith {
26              pub fn saturating_sub(self, second: Self) -> Self {
27                  unsafe { simd_saturating_sub(self, second) }
28              }
29 +            */
30          })+
31      }
32  }
33 @@ -51,6 +53,7 @@ macro_rules! impl_int_arith {
34      ($($ty:ty),+) => {
35          $( impl<const LANES: usize> Simd<$ty, LANES> where LaneCount<LANES>: SupportedLaneCount {
36  
37 +            /*
38              /// Lanewise saturating add.
39              ///
40              /// # Examples
41 @@ -89,6 +92,7 @@ macro_rules! impl_int_arith {
42              pub fn saturating_sub(self, second: Self) -> Self {
43                  unsafe { simd_saturating_sub(self, second) }
44              }
45 +            */
46  
47              /// Lanewise absolute value, implemented in Rust.
48              /// Every lane becomes its absolute value.
49 @@ -109,6 +113,7 @@ macro_rules! impl_int_arith {
50                  (self^m) - m
51              }
52  
53 +            /*
54              /// Lanewise saturating absolute value, implemented in Rust.
55              /// As abs(), except the MIN value becomes MAX instead of itself.
56              ///
57 @@ -151,6 +156,7 @@ macro_rules! impl_int_arith {
58              pub fn saturating_neg(self) -> Self {
59                  Self::splat(0).saturating_sub(self)
60              }
61 +            */
62          })+
63      }
64  }
65 diff --git a/crates/core_simd/src/vector.rs b/crates/core_simd/src/vector.rs
66 index 7c5ec2b..c8631e8 100644
67 --- a/crates/core_simd/src/vector.rs
68 +++ b/crates/core_simd/src/vector.rs
69 @@ -75,6 +75,7 @@ where
70          Self(array)
71      }
72  
73 +    /*
74      /// Reads from potentially discontiguous indices in `slice` to construct a SIMD vector.
75      /// If an index is out-of-bounds, the lane is instead selected from the `or` vector.
76      ///
77 @@ -297,6 +298,7 @@ where
78              // Cleared ☢️ *mut T Zone
79          }
80      }
81 +    */
82  }
83  
84  impl<T, const LANES: usize> Copy for Simd<T, LANES>
85 diff --git a/crates/core_simd/tests/masks.rs b/crates/core_simd/tests/masks.rs
86 index 6a8ecd3..68fcb49 100644
87 --- a/crates/core_simd/tests/masks.rs
88 +++ b/crates/core_simd/tests/masks.rs
89 @@ -68,6 +68,7 @@ macro_rules! test_mask_api {
90                  assert_eq!(core_simd::Mask::<$type, 8>::from_int(int), mask);
91              }
92  
93 +            /*
94              #[cfg(feature = "generic_const_exprs")]
95              #[test]
96              fn roundtrip_bitmask_conversion() {
97 @@ -80,6 +81,7 @@ macro_rules! test_mask_api {
98                  assert_eq!(bitmask, [0b01001001, 0b10000011]);
99                  assert_eq!(core_simd::Mask::<$type, 16>::from_bitmask(bitmask), mask);
100              }
101 +            */
102          }
103      }
104  }
105 -- 
106 2.26.2.7.g19db9cfb68
107