Skip to content

Commit

Permalink
Add a new test that narrow down the issue
Browse files Browse the repository at this point in the history
My current hypothesis is that this could be an issue with simd_shuffle
  • Loading branch information
celinval committed Dec 6, 2023
1 parent 74cf69d commit 787268c
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion tests/kani/SIMD/portable_simd.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
//! Ensure we have basic support of portable SIMD.
#![feature(portable_simd)]

use std::simd::{mask32x4, u64x16};
use std::simd::{mask32x4, u32x4, u64x16};

#[kani::proof]
fn check_sum_any() {
Expand All @@ -23,3 +23,11 @@ fn check_mask() {
let bitmask = mask.to_bitmask();
assert_eq!(bitmask, 0b1010);
}

#[kani::proof]
fn check_resize() {
let x = u32x4::from_array([0, 1, 2, 3]);
assert_eq!(x.resize::<8>(9).to_array(), [0, 1, 2, 3, 9, 9, 9, 9]);
assert_eq!(x.resize::<2>(9).to_array(), [0, 1]);

}

0 comments on commit 787268c

Please sign in to comment.