Skip to content

Commit

Permalink
Fixup aarch64 smoke test
Browse files Browse the repository at this point in the history
  • Loading branch information
workingjubilee committed Mar 23, 2022
1 parent 8fa4ae8 commit 6c19dc9
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions src/test/ui/target-feature/aarch64-neon-works.rs
Original file line number Diff line number Diff line change
@@ -1,20 +1,19 @@
// only-aarch64
// run-pass
#![allow(dead_code)]
use std::arch::*;
use std::arch::aarch64::*;

// Smoke test to verify aarch64 code that enables NEON compiles.
fn main() {
let zero = if is_aarch64_feature_detected!("neon") {
let _zero = if is_aarch64_feature_detected!("neon") {
unsafe {
let zeros = zero_vector();
vget_lane_u8::<1>(1)
vgetq_lane_u8::<1>(zeros)
}
} else {
0
};
if cfg!(target feature = "neon") {
assert_eq!(zero, 0)
};
}


Expand Down

0 comments on commit 6c19dc9

Please sign in to comment.