@@ -14656,48 +14656,48 @@ mod test {
14656
14656
14657
14657
#[simd_test(enable = "neon")]
14658
14658
unsafe fn test_vshr_n_s8() {
14659
- let a: i8x8 = i8x8::new(4, 0 , 12, 0 , 20, 0 , 28, 0 );
14660
- let e: i8x8 = i8x8::new(1, 0 , 3, 0 , 5, 0 , 7, 0 );
14659
+ let a: i8x8 = i8x8::new(4, 8 , 12, 16 , 20, 24 , 28, 32 );
14660
+ let e: i8x8 = i8x8::new(1, 2 , 3, 4 , 5, 6 , 7, 8 );
14661
14661
let r: i8x8 = transmute(vshr_n_s8::<2>(transmute(a)));
14662
14662
assert_eq!(r, e);
14663
14663
}
14664
14664
14665
14665
#[simd_test(enable = "neon")]
14666
14666
unsafe fn test_vshrq_n_s8() {
14667
- let a: i8x16 = i8x16::new(4, 0 , 12, 0 , 20, 0 , 28, 0 , 36, 0 , 44, 0 , 52, 0 , 60, 0 );
14668
- let e: i8x16 = i8x16::new(1, 0 , 3, 0 , 5, 0 , 7, 0 , 9, 0 , 11, 0 , 13, 0 , 15, 0 );
14667
+ let a: i8x16 = i8x16::new(4, 8 , 12, 16 , 20, 24 , 28, 32 , 36, 40 , 44, 48 , 52, 56 , 60, 64 );
14668
+ let e: i8x16 = i8x16::new(1, 2 , 3, 4 , 5, 6 , 7, 8 , 9, 10 , 11, 12 , 13, 14 , 15, 16 );
14669
14669
let r: i8x16 = transmute(vshrq_n_s8::<2>(transmute(a)));
14670
14670
assert_eq!(r, e);
14671
14671
}
14672
14672
14673
14673
#[simd_test(enable = "neon")]
14674
14674
unsafe fn test_vshr_n_s16() {
14675
- let a: i16x4 = i16x4::new(4, 0 , 12, 0 );
14676
- let e: i16x4 = i16x4::new(1, 0 , 3, 0 );
14675
+ let a: i16x4 = i16x4::new(4, 8 , 12, 16 );
14676
+ let e: i16x4 = i16x4::new(1, 2 , 3, 4 );
14677
14677
let r: i16x4 = transmute(vshr_n_s16::<2>(transmute(a)));
14678
14678
assert_eq!(r, e);
14679
14679
}
14680
14680
14681
14681
#[simd_test(enable = "neon")]
14682
14682
unsafe fn test_vshrq_n_s16() {
14683
- let a: i16x8 = i16x8::new(4, 0 , 12, 0 , 20, 0 , 28, 0 );
14684
- let e: i16x8 = i16x8::new(1, 0 , 3, 0 , 5, 0 , 7, 0 );
14683
+ let a: i16x8 = i16x8::new(4, 8 , 12, 16 , 20, 24 , 28, 32 );
14684
+ let e: i16x8 = i16x8::new(1, 2 , 3, 4 , 5, 6 , 7, 8 );
14685
14685
let r: i16x8 = transmute(vshrq_n_s16::<2>(transmute(a)));
14686
14686
assert_eq!(r, e);
14687
14687
}
14688
14688
14689
14689
#[simd_test(enable = "neon")]
14690
14690
unsafe fn test_vshr_n_s32() {
14691
- let a: i32x2 = i32x2::new(4, 0 );
14692
- let e: i32x2 = i32x2::new(1, 0 );
14691
+ let a: i32x2 = i32x2::new(4, 8 );
14692
+ let e: i32x2 = i32x2::new(1, 2 );
14693
14693
let r: i32x2 = transmute(vshr_n_s32::<2>(transmute(a)));
14694
14694
assert_eq!(r, e);
14695
14695
}
14696
14696
14697
14697
#[simd_test(enable = "neon")]
14698
14698
unsafe fn test_vshrq_n_s32() {
14699
- let a: i32x4 = i32x4::new(4, 0 , 12, 0 );
14700
- let e: i32x4 = i32x4::new(1, 0 , 3, 0 );
14699
+ let a: i32x4 = i32x4::new(4, 8 , 12, 16 );
14700
+ let e: i32x4 = i32x4::new(1, 2 , 3, 4 );
14701
14701
let r: i32x4 = transmute(vshrq_n_s32::<2>(transmute(a)));
14702
14702
assert_eq!(r, e);
14703
14703
}
@@ -14712,56 +14712,56 @@ mod test {
14712
14712
14713
14713
#[simd_test(enable = "neon")]
14714
14714
unsafe fn test_vshrq_n_s64() {
14715
- let a: i64x2 = i64x2::new(4, 0 );
14716
- let e: i64x2 = i64x2::new(1, 0 );
14715
+ let a: i64x2 = i64x2::new(4, 8 );
14716
+ let e: i64x2 = i64x2::new(1, 2 );
14717
14717
let r: i64x2 = transmute(vshrq_n_s64::<2>(transmute(a)));
14718
14718
assert_eq!(r, e);
14719
14719
}
14720
14720
14721
14721
#[simd_test(enable = "neon")]
14722
14722
unsafe fn test_vshr_n_u8() {
14723
- let a: u8x8 = u8x8::new(4, 0 , 12, 0 , 20, 0 , 28, 0 );
14724
- let e: u8x8 = u8x8::new(1, 0 , 3, 0 , 5, 0 , 7, 0 );
14723
+ let a: u8x8 = u8x8::new(4, 8 , 12, 16 , 20, 24 , 28, 32 );
14724
+ let e: u8x8 = u8x8::new(1, 2 , 3, 4 , 5, 6 , 7, 8 );
14725
14725
let r: u8x8 = transmute(vshr_n_u8::<2>(transmute(a)));
14726
14726
assert_eq!(r, e);
14727
14727
}
14728
14728
14729
14729
#[simd_test(enable = "neon")]
14730
14730
unsafe fn test_vshrq_n_u8() {
14731
- let a: u8x16 = u8x16::new(4, 0 , 12, 0 , 20, 0 , 28, 0 , 36, 0 , 44, 0 , 52, 0 , 60, 0 );
14732
- let e: u8x16 = u8x16::new(1, 0 , 3, 0 , 5, 0 , 7, 0 , 9, 0 , 11, 0 , 13, 0 , 15, 0 );
14731
+ let a: u8x16 = u8x16::new(4, 8 , 12, 16 , 20, 24 , 28, 32 , 36, 40 , 44, 48 , 52, 56 , 60, 64 );
14732
+ let e: u8x16 = u8x16::new(1, 2 , 3, 4 , 5, 6 , 7, 8 , 9, 10 , 11, 12 , 13, 14 , 15, 16 );
14733
14733
let r: u8x16 = transmute(vshrq_n_u8::<2>(transmute(a)));
14734
14734
assert_eq!(r, e);
14735
14735
}
14736
14736
14737
14737
#[simd_test(enable = "neon")]
14738
14738
unsafe fn test_vshr_n_u16() {
14739
- let a: u16x4 = u16x4::new(4, 0 , 12, 0 );
14740
- let e: u16x4 = u16x4::new(1, 0 , 3, 0 );
14739
+ let a: u16x4 = u16x4::new(4, 8 , 12, 16 );
14740
+ let e: u16x4 = u16x4::new(1, 2 , 3, 4 );
14741
14741
let r: u16x4 = transmute(vshr_n_u16::<2>(transmute(a)));
14742
14742
assert_eq!(r, e);
14743
14743
}
14744
14744
14745
14745
#[simd_test(enable = "neon")]
14746
14746
unsafe fn test_vshrq_n_u16() {
14747
- let a: u16x8 = u16x8::new(4, 0 , 12, 0 , 20, 0 , 28, 0 );
14748
- let e: u16x8 = u16x8::new(1, 0 , 3, 0 , 5, 0 , 7, 0 );
14747
+ let a: u16x8 = u16x8::new(4, 8 , 12, 16 , 20, 24 , 28, 32 );
14748
+ let e: u16x8 = u16x8::new(1, 2 , 3, 4 , 5, 6 , 7, 8 );
14749
14749
let r: u16x8 = transmute(vshrq_n_u16::<2>(transmute(a)));
14750
14750
assert_eq!(r, e);
14751
14751
}
14752
14752
14753
14753
#[simd_test(enable = "neon")]
14754
14754
unsafe fn test_vshr_n_u32() {
14755
- let a: u32x2 = u32x2::new(4, 0 );
14756
- let e: u32x2 = u32x2::new(1, 0 );
14755
+ let a: u32x2 = u32x2::new(4, 8 );
14756
+ let e: u32x2 = u32x2::new(1, 2 );
14757
14757
let r: u32x2 = transmute(vshr_n_u32::<2>(transmute(a)));
14758
14758
assert_eq!(r, e);
14759
14759
}
14760
14760
14761
14761
#[simd_test(enable = "neon")]
14762
14762
unsafe fn test_vshrq_n_u32() {
14763
- let a: u32x4 = u32x4::new(4, 0 , 12, 0 );
14764
- let e: u32x4 = u32x4::new(1, 0 , 3, 0 );
14763
+ let a: u32x4 = u32x4::new(4, 8 , 12, 16 );
14764
+ let e: u32x4 = u32x4::new(1, 2 , 3, 4 );
14765
14765
let r: u32x4 = transmute(vshrq_n_u32::<2>(transmute(a)));
14766
14766
assert_eq!(r, e);
14767
14767
}
@@ -14776,8 +14776,8 @@ mod test {
14776
14776
14777
14777
#[simd_test(enable = "neon")]
14778
14778
unsafe fn test_vshrq_n_u64() {
14779
- let a: u64x2 = u64x2::new(4, 0 );
14780
- let e: u64x2 = u64x2::new(1, 0 );
14779
+ let a: u64x2 = u64x2::new(4, 8 );
14780
+ let e: u64x2 = u64x2::new(1, 2 );
14781
14781
let r: u64x2 = transmute(vshrq_n_u64::<2>(transmute(a)));
14782
14782
assert_eq!(r, e);
14783
14783
}
0 commit comments