Skip to content

Commit 5002006

Browse files
committed
Address review comments
1 parent eb9ed3a commit 5002006

File tree

1 file changed

+10
-18
lines changed

1 file changed

+10
-18
lines changed

compiler/rustc_typeck/src/collect.rs

+10-18
Original file line numberDiff line numberDiff line change
@@ -2520,13 +2520,8 @@ fn simd_ffi_feature_check(
25202520
{
25212521
Ok(())
25222522
}
2523-
8 => Err(Some("mmx")),
2524-
16 if feature.contains("sse")
2525-
|| feature.contains("ssse")
2526-
|| feature.contains("avx") =>
2527-
{
2528-
Ok(())
2529-
}
2523+
8 => Err(None),
2524+
16 if feature.contains("sse") => Ok(()),
25302525
16 => Err(Some("sse")),
25312526
32 if feature.contains("avx") => Ok(()),
25322527
32 => Err(Some("avx")),
@@ -2535,19 +2530,16 @@ fn simd_ffi_feature_check(
25352530
_ => Err(None),
25362531
}
25372532
}
2538-
t if t.contains("arm") => {
2539-
match simd_width {
2540-
// 32-bit arm does not support vectors with 64-bit wide elements
2541-
8 | 16 if simd_elem_width < 8 => {
2542-
if feature.contains("neon") {
2543-
Ok(())
2544-
} else {
2545-
Err(Some("neon"))
2546-
}
2533+
t if t.contains("arm") => match simd_width {
2534+
8 | 16 | 32 => {
2535+
if feature.contains("neon") {
2536+
Ok(())
2537+
} else {
2538+
Err(Some("neon"))
25472539
}
2548-
_ => Err(None),
25492540
}
2550-
}
2541+
_ => Err(None),
2542+
},
25512543
t if t.contains("aarch64") => match simd_width {
25522544
8 | 16 => {
25532545
if feature.contains("neon") {

0 commit comments

Comments
 (0)