Skip to content

Commit

Permalink
Address review comments
Browse files Browse the repository at this point in the history
  • Loading branch information
JohnTitor committed Jul 24, 2021
1 parent eb9ed3a commit 5002006
Showing 1 changed file with 10 additions and 18 deletions.
28 changes: 10 additions & 18 deletions compiler/rustc_typeck/src/collect.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2520,13 +2520,8 @@ fn simd_ffi_feature_check(
{
Ok(())
}
8 => Err(Some("mmx")),
16 if feature.contains("sse")
|| feature.contains("ssse")
|| feature.contains("avx") =>
{
Ok(())
}
8 => Err(None),
16 if feature.contains("sse") => Ok(()),
16 => Err(Some("sse")),
32 if feature.contains("avx") => Ok(()),
32 => Err(Some("avx")),
Expand All @@ -2535,19 +2530,16 @@ fn simd_ffi_feature_check(
_ => Err(None),
}
}
t if t.contains("arm") => {
match simd_width {
// 32-bit arm does not support vectors with 64-bit wide elements
8 | 16 if simd_elem_width < 8 => {
if feature.contains("neon") {
Ok(())
} else {
Err(Some("neon"))
}
t if t.contains("arm") => match simd_width {
8 | 16 | 32 => {
if feature.contains("neon") {
Ok(())
} else {
Err(Some("neon"))
}
_ => Err(None),
}
}
_ => Err(None),
},
t if t.contains("aarch64") => match simd_width {
8 | 16 => {
if feature.contains("neon") {
Expand Down

0 comments on commit 5002006

Please sign in to comment.