Merge commit '05677b6bd6
' into sync_cg_clif-2021-08-06
This commit is contained in:
commit
279f486960
40 changed files with 823 additions and 590 deletions
|
@ -0,0 +1,165 @@
|
|||
From 6bfce5dc2cbf834c74dbccb7538adc08c6eb57e7 Mon Sep 17 00:00:00 2001
|
||||
From: bjorn3 <bjorn3@users.noreply.github.com>
|
||||
Date: Sun, 25 Jul 2021 18:39:31 +0200
|
||||
Subject: [PATCH] Disable unsupported tests
|
||||
|
||||
---
|
||||
crates/core_simd/src/array.rs | 2 ++
|
||||
crates/core_simd/src/lib.rs | 2 +-
|
||||
crates/core_simd/src/math.rs | 4 ++++
|
||||
crates/core_simd/tests/masks.rs | 12 ------------
|
||||
crates/core_simd/tests/ops_macros.rs | 6 ++++++
|
||||
crates/core_simd/tests/round.rs | 2 ++
|
||||
6 files changed, 15 insertions(+), 13 deletions(-)
|
||||
|
||||
diff --git a/crates/core_simd/src/array.rs b/crates/core_simd/src/array.rs
|
||||
index 25c5309..2b3d819 100644
|
||||
--- a/crates/core_simd/src/array.rs
|
||||
+++ b/crates/core_simd/src/array.rs
|
||||
@@ -22,6 +22,7 @@ where
|
||||
#[must_use]
|
||||
fn splat(val: Self::Scalar) -> Self;
|
||||
|
||||
+ /*
|
||||
/// SIMD gather: construct a SIMD vector by reading from a slice, using potentially discontiguous indices.
|
||||
/// If an index is out of bounds, that lane instead selects the value from the "or" vector.
|
||||
/// ```
|
||||
@@ -150,6 +151,7 @@ where
|
||||
// Cleared ☢️ *mut T Zone
|
||||
}
|
||||
}
|
||||
+ */
|
||||
}
|
||||
|
||||
macro_rules! impl_simdarray_for {
|
||||
diff --git a/crates/core_simd/src/lib.rs b/crates/core_simd/src/lib.rs
|
||||
index a64904d..299eb11 100644
|
||||
--- a/crates/core_simd/src/lib.rs
|
||||
+++ b/crates/core_simd/src/lib.rs
|
||||
@@ -1,7 +1,7 @@
|
||||
#![no_std]
|
||||
#![allow(incomplete_features)]
|
||||
#![feature(
|
||||
- const_generics,
|
||||
+ const_generics,
|
||||
platform_intrinsics,
|
||||
repr_simd,
|
||||
simd_ffi,
|
||||
diff --git a/crates/core_simd/src/math.rs b/crates/core_simd/src/math.rs
|
||||
index 7290a28..e394730 100644
|
||||
--- a/crates/core_simd/src/math.rs
|
||||
+++ b/crates/core_simd/src/math.rs
|
||||
@@ -2,6 +2,7 @@ macro_rules! impl_uint_arith {
|
||||
($(($name:ident, $n:ident)),+) => {
|
||||
$( impl<const LANES: usize> $name<LANES> where Self: crate::LanesAtMost32 {
|
||||
|
||||
+ /*
|
||||
/// Lanewise saturating add.
|
||||
///
|
||||
/// # Examples
|
||||
@@ -38,6 +39,7 @@ macro_rules! impl_uint_arith {
|
||||
pub fn saturating_sub(self, second: Self) -> Self {
|
||||
unsafe { crate::intrinsics::simd_saturating_sub(self, second) }
|
||||
}
|
||||
+ */
|
||||
})+
|
||||
}
|
||||
}
|
||||
@@ -46,6 +48,7 @@ macro_rules! impl_int_arith {
|
||||
($(($name:ident, $n:ident)),+) => {
|
||||
$( impl<const LANES: usize> $name<LANES> where Self: crate::LanesAtMost32 {
|
||||
|
||||
+ /*
|
||||
/// Lanewise saturating add.
|
||||
///
|
||||
/// # Examples
|
||||
@@ -141,6 +144,7 @@ macro_rules! impl_int_arith {
|
||||
pub fn saturating_neg(self) -> Self {
|
||||
Self::splat(0).saturating_sub(self)
|
||||
}
|
||||
+ */
|
||||
})+
|
||||
}
|
||||
}
|
||||
diff --git a/crates/core_simd/tests/masks.rs b/crates/core_simd/tests/masks.rs
|
||||
index 61d8e44..2bccae2 100644
|
||||
--- a/crates/core_simd/tests/masks.rs
|
||||
+++ b/crates/core_simd/tests/masks.rs
|
||||
@@ -67,18 +67,6 @@ macro_rules! test_mask_api {
|
||||
assert_eq!(int.to_array(), [-1, 0, 0, -1, 0, 0, -1, 0]);
|
||||
assert_eq!(core_simd::$name::<8>::from_int(int), mask);
|
||||
}
|
||||
-
|
||||
- #[test]
|
||||
- fn roundtrip_bitmask_conversion() {
|
||||
- let values = [
|
||||
- true, false, false, true, false, false, true, false,
|
||||
- true, true, false, false, false, false, false, true,
|
||||
- ];
|
||||
- let mask = core_simd::$name::<16>::from_array(values);
|
||||
- let bitmask = mask.to_bitmask();
|
||||
- assert_eq!(bitmask, [0b01001001, 0b10000011]);
|
||||
- assert_eq!(core_simd::$name::<16>::from_bitmask(bitmask), mask);
|
||||
- }
|
||||
}
|
||||
}
|
||||
}
|
||||
diff --git a/crates/core_simd/tests/ops_macros.rs b/crates/core_simd/tests/ops_macros.rs
|
||||
index cb39e73..fc0ebe1 100644
|
||||
--- a/crates/core_simd/tests/ops_macros.rs
|
||||
+++ b/crates/core_simd/tests/ops_macros.rs
|
||||
@@ -435,6 +435,7 @@ macro_rules! impl_float_tests {
|
||||
)
|
||||
}
|
||||
|
||||
+ /*
|
||||
fn mul_add<const LANES: usize>() {
|
||||
test_helpers::test_ternary_elementwise(
|
||||
&Vector::<LANES>::mul_add,
|
||||
@@ -442,6 +443,7 @@ macro_rules! impl_float_tests {
|
||||
&|_, _, _| true,
|
||||
)
|
||||
}
|
||||
+ */
|
||||
|
||||
fn sqrt<const LANES: usize>() {
|
||||
test_helpers::test_unary_elementwise(
|
||||
@@ -581,6 +585,7 @@ macro_rules! impl_float_tests {
|
||||
});
|
||||
}
|
||||
|
||||
+ /*
|
||||
fn horizontal_max<const LANES: usize>() {
|
||||
test_helpers::test_1(&|x| {
|
||||
let vmax = Vector::<LANES>::from_array(x).horizontal_max();
|
||||
@@ -604,6 +609,7 @@ macro_rules! impl_float_tests {
|
||||
Ok(())
|
||||
});
|
||||
}
|
||||
+ */
|
||||
}
|
||||
}
|
||||
}
|
||||
diff --git a/crates/core_simd/tests/round.rs b/crates/core_simd/tests/round.rs
|
||||
index 37044a7..4cdc6b7 100644
|
||||
--- a/crates/core_simd/tests/round.rs
|
||||
+++ b/crates/core_simd/tests/round.rs
|
||||
@@ -25,6 +25,7 @@ macro_rules! float_rounding_test {
|
||||
)
|
||||
}
|
||||
|
||||
+ /*
|
||||
fn round<const LANES: usize>() {
|
||||
test_helpers::test_unary_elementwise(
|
||||
&Vector::<LANES>::round,
|
||||
@@ -32,6 +33,7 @@ macro_rules! float_rounding_test {
|
||||
&|_| true,
|
||||
)
|
||||
}
|
||||
+ */
|
||||
|
||||
fn trunc<const LANES: usize>() {
|
||||
test_helpers::test_unary_elementwise(
|
||||
--
|
||||
2.26.2.7.g19db9cfb68
|
||||
|
|
@ -51,14 +51,14 @@ index 1a6be3a..42dbd59 100644
|
|||
#[test]
|
||||
#[allow(warnings)]
|
||||
// Have a symbol for the test below. It doesn’t need to be an actual variadic function, match the
|
||||
@@ -289,6 +290,7 @@ fn write_unaligned_drop() {
|
||||
}
|
||||
DROPS.with(|d| assert_eq!(*d.borrow(), [0]));
|
||||
@@ -277,6 +277,7 @@ pub fn test_variadic_fnptr() {
|
||||
let mut s = SipHasher::new();
|
||||
assert_eq!(p.hash(&mut s), q.hash(&mut s));
|
||||
}
|
||||
+*/
|
||||
|
||||
#[test]
|
||||
fn align_offset_zst() {
|
||||
fn write_unaligned_drop() {
|
||||
diff --git a/library/core/tests/slice.rs b/library/core/tests/slice.rs
|
||||
index 6609bc3..241b497 100644
|
||||
--- a/library/core/tests/slice.rs
|
||||
|
|
|
@ -46,45 +46,5 @@ index 4bc44e9..8e3c7a4 100644
|
|||
|
||||
#[test]
|
||||
fn cell_allows_array_cycle() {
|
||||
diff --git a/library/core/tests/num/mod.rs b/library/core/tests/num/mod.rs
|
||||
index a17c094..5bb11d2 100644
|
||||
--- a/library/core/tests/num/mod.rs
|
||||
+++ b/library/core/tests/num/mod.rs
|
||||
@@ -651,11 +651,12 @@ macro_rules! test_float {
|
||||
assert_eq!((9.0 as $fty).min($neginf), $neginf);
|
||||
assert_eq!(($neginf as $fty).min(-9.0), $neginf);
|
||||
assert_eq!((-9.0 as $fty).min($neginf), $neginf);
|
||||
- assert_eq!(($nan as $fty).min(9.0), 9.0);
|
||||
- assert_eq!(($nan as $fty).min(-9.0), -9.0);
|
||||
- assert_eq!((9.0 as $fty).min($nan), 9.0);
|
||||
- assert_eq!((-9.0 as $fty).min($nan), -9.0);
|
||||
- assert!(($nan as $fty).min($nan).is_nan());
|
||||
+ // Cranelift fmin has NaN propagation
|
||||
+ //assert_eq!(($nan as $fty).min(9.0), 9.0);
|
||||
+ //assert_eq!(($nan as $fty).min(-9.0), -9.0);
|
||||
+ //assert_eq!((9.0 as $fty).min($nan), 9.0);
|
||||
+ //assert_eq!((-9.0 as $fty).min($nan), -9.0);
|
||||
+ //assert!(($nan as $fty).min($nan).is_nan());
|
||||
}
|
||||
#[test]
|
||||
fn max() {
|
||||
@@ -673,11 +674,12 @@ macro_rules! test_float {
|
||||
assert_eq!((9.0 as $fty).max($neginf), 9.0);
|
||||
assert_eq!(($neginf as $fty).max(-9.0), -9.0);
|
||||
assert_eq!((-9.0 as $fty).max($neginf), -9.0);
|
||||
- assert_eq!(($nan as $fty).max(9.0), 9.0);
|
||||
- assert_eq!(($nan as $fty).max(-9.0), -9.0);
|
||||
- assert_eq!((9.0 as $fty).max($nan), 9.0);
|
||||
- assert_eq!((-9.0 as $fty).max($nan), -9.0);
|
||||
- assert!(($nan as $fty).max($nan).is_nan());
|
||||
+ // Cranelift fmax has NaN propagation
|
||||
+ //assert_eq!(($nan as $fty).max(9.0), 9.0);
|
||||
+ //assert_eq!(($nan as $fty).max(-9.0), -9.0);
|
||||
+ //assert_eq!((9.0 as $fty).max($nan), 9.0);
|
||||
+ //assert_eq!((-9.0 as $fty).max($nan), -9.0);
|
||||
+ //assert!(($nan as $fty).max($nan).is_nan());
|
||||
}
|
||||
#[test]
|
||||
fn rem_euclid() {
|
||||
--
|
||||
2.21.0 (Apple Git-122)
|
||||
|
|
|
@ -1,20 +1,44 @@
|
|||
From 894e07dfec2624ba539129b1c1d63e1d7d812bda Mon Sep 17 00:00:00 2001
|
||||
From 6a4e6f5dc8c8a529a822eb9b57f9e57519595439 Mon Sep 17 00:00:00 2001
|
||||
From: bjorn3 <bjorn3@users.noreply.github.com>
|
||||
Date: Thu, 18 Feb 2021 18:45:28 +0100
|
||||
Subject: [PATCH] Disable 128bit atomic operations
|
||||
|
||||
Cranelift doesn't support them yet
|
||||
---
|
||||
library/core/src/sync/atomic.rs | 38 ---------------------------------
|
||||
library/core/tests/atomic.rs | 4 ----
|
||||
library/std/src/panic.rs | 6 ------
|
||||
library/core/src/panic/unwind_safe.rs | 6 -----
|
||||
library/core/src/sync/atomic.rs | 38 ---------------------------
|
||||
library/core/tests/atomic.rs | 4 ---
|
||||
3 files changed, 48 deletions(-)
|
||||
|
||||
diff --git a/library/core/src/panic/unwind_safe.rs b/library/core/src/panic/unwind_safe.rs
|
||||
index 092b7cf..158cf71 100644
|
||||
--- a/library/core/src/panic/unwind_safe.rs
|
||||
+++ b/library/core/src/panic/unwind_safe.rs
|
||||
@@ -216,9 +216,6 @@ impl RefUnwindSafe for crate::sync::atomic::AtomicI32 {}
|
||||
#[cfg(target_has_atomic_load_store = "64")]
|
||||
#[stable(feature = "integer_atomics_stable", since = "1.34.0")]
|
||||
impl RefUnwindSafe for crate::sync::atomic::AtomicI64 {}
|
||||
-#[cfg(target_has_atomic_load_store = "128")]
|
||||
-#[unstable(feature = "integer_atomics", issue = "32976")]
|
||||
-impl RefUnwindSafe for crate::sync::atomic::AtomicI128 {}
|
||||
|
||||
#[cfg(target_has_atomic_load_store = "ptr")]
|
||||
#[stable(feature = "unwind_safe_atomic_refs", since = "1.14.0")]
|
||||
@@ -235,9 +232,6 @@ impl RefUnwindSafe for crate::sync::atomic::AtomicU32 {}
|
||||
#[cfg(target_has_atomic_load_store = "64")]
|
||||
#[stable(feature = "integer_atomics_stable", since = "1.34.0")]
|
||||
impl RefUnwindSafe for crate::sync::atomic::AtomicU64 {}
|
||||
-#[cfg(target_has_atomic_load_store = "128")]
|
||||
-#[unstable(feature = "integer_atomics", issue = "32976")]
|
||||
-impl RefUnwindSafe for crate::sync::atomic::AtomicU128 {}
|
||||
|
||||
#[cfg(target_has_atomic_load_store = "8")]
|
||||
#[stable(feature = "unwind_safe_atomic_refs", since = "1.14.0")]
|
||||
diff --git a/library/core/src/sync/atomic.rs b/library/core/src/sync/atomic.rs
|
||||
index 81c9e1d..65c9503 100644
|
||||
index 0194c58..25a0038 100644
|
||||
--- a/library/core/src/sync/atomic.rs
|
||||
+++ b/library/core/src/sync/atomic.rs
|
||||
@@ -2228,44 +2228,6 @@ atomic_int! {
|
||||
@@ -2229,44 +2229,6 @@ atomic_int! {
|
||||
"AtomicU64::new(0)",
|
||||
u64 AtomicU64 ATOMIC_U64_INIT
|
||||
}
|
||||
|
@ -60,10 +84,10 @@ index 81c9e1d..65c9503 100644
|
|||
macro_rules! atomic_int_ptr_sized {
|
||||
( $($target_pointer_width:literal $align:literal)* ) => { $(
|
||||
diff --git a/library/core/tests/atomic.rs b/library/core/tests/atomic.rs
|
||||
index 2d1e449..cb6da5d 100644
|
||||
index b735957..ea728b6 100644
|
||||
--- a/library/core/tests/atomic.rs
|
||||
+++ b/library/core/tests/atomic.rs
|
||||
@@ -145,10 +145,6 @@ fn atomic_alignment() {
|
||||
@@ -185,10 +185,6 @@ fn atomic_alignment() {
|
||||
assert_eq!(align_of::<AtomicU64>(), size_of::<AtomicU64>());
|
||||
#[cfg(target_has_atomic = "64")]
|
||||
assert_eq!(align_of::<AtomicI64>(), size_of::<AtomicI64>());
|
||||
|
@ -74,30 +98,6 @@ index 2d1e449..cb6da5d 100644
|
|||
#[cfg(target_has_atomic = "ptr")]
|
||||
assert_eq!(align_of::<AtomicUsize>(), size_of::<AtomicUsize>());
|
||||
#[cfg(target_has_atomic = "ptr")]
|
||||
diff --git a/library/std/src/panic.rs b/library/std/src/panic.rs
|
||||
index 89a822a..779fd88 100644
|
||||
--- a/library/std/src/panic.rs
|
||||
+++ b/library/std/src/panic.rs
|
||||
@@ -279,9 +279,6 @@ impl RefUnwindSafe for atomic::AtomicI32 {}
|
||||
#[cfg(target_has_atomic_load_store = "64")]
|
||||
#[stable(feature = "integer_atomics_stable", since = "1.34.0")]
|
||||
impl RefUnwindSafe for atomic::AtomicI64 {}
|
||||
-#[cfg(target_has_atomic_load_store = "128")]
|
||||
-#[unstable(feature = "integer_atomics", issue = "32976")]
|
||||
-impl RefUnwindSafe for atomic::AtomicI128 {}
|
||||
|
||||
#[cfg(target_has_atomic_load_store = "ptr")]
|
||||
#[stable(feature = "unwind_safe_atomic_refs", since = "1.14.0")]
|
||||
@@ -298,9 +295,6 @@ impl RefUnwindSafe for atomic::AtomicU32 {}
|
||||
#[cfg(target_has_atomic_load_store = "64")]
|
||||
#[stable(feature = "integer_atomics_stable", since = "1.34.0")]
|
||||
impl RefUnwindSafe for atomic::AtomicU64 {}
|
||||
-#[cfg(target_has_atomic_load_store = "128")]
|
||||
-#[unstable(feature = "integer_atomics", issue = "32976")]
|
||||
-impl RefUnwindSafe for atomic::AtomicU128 {}
|
||||
|
||||
#[cfg(target_has_atomic_load_store = "8")]
|
||||
#[stable(feature = "unwind_safe_atomic_refs", since = "1.14.0")]
|
||||
--
|
||||
2.26.2.7.g19db9cfb68
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue