@@ -14416,48 +14416,48 @@ mod test {
14416
14416
14417
14417
#[simd_test(enable = "neon")]
14418
14418
unsafe fn test_vshr_n_s8() {
14419
- let a: i8x8 = i8x8::new(4, 0 , 12, 0 , 20, 0 , 28, 0 );
14420
- let e: i8x8 = i8x8::new(1, 0 , 3, 0 , 5, 0 , 7, 0 );
14419
+ let a: i8x8 = i8x8::new(4, 8 , 12, 16 , 20, 24 , 28, 32 );
14420
+ let e: i8x8 = i8x8::new(1, 2 , 3, 4 , 5, 6 , 7, 8 );
14421
14421
let r: i8x8 = transmute(vshr_n_s8::<2>(transmute(a)));
14422
14422
assert_eq!(r, e);
14423
14423
}
14424
14424
14425
14425
#[simd_test(enable = "neon")]
14426
14426
unsafe fn test_vshrq_n_s8() {
14427
- let a: i8x16 = i8x16::new(4, 0 , 12, 0 , 20, 0 , 28, 0 , 36, 0 , 44, 0 , 52, 0 , 60, 0 );
14428
- let e: i8x16 = i8x16::new(1, 0 , 3, 0 , 5, 0 , 7, 0 , 9, 0 , 11, 0 , 13, 0 , 15, 0 );
14427
+ let a: i8x16 = i8x16::new(4, 8 , 12, 16 , 20, 24 , 28, 32 , 36, 40 , 44, 48 , 52, 56 , 60, 64 );
14428
+ let e: i8x16 = i8x16::new(1, 2 , 3, 4 , 5, 6 , 7, 8 , 9, 10 , 11, 12 , 13, 14 , 15, 16 );
14429
14429
let r: i8x16 = transmute(vshrq_n_s8::<2>(transmute(a)));
14430
14430
assert_eq!(r, e);
14431
14431
}
14432
14432
14433
14433
#[simd_test(enable = "neon")]
14434
14434
unsafe fn test_vshr_n_s16() {
14435
- let a: i16x4 = i16x4::new(4, 0 , 12, 0 );
14436
- let e: i16x4 = i16x4::new(1, 0 , 3, 0 );
14435
+ let a: i16x4 = i16x4::new(4, 8 , 12, 16 );
14436
+ let e: i16x4 = i16x4::new(1, 2 , 3, 4 );
14437
14437
let r: i16x4 = transmute(vshr_n_s16::<2>(transmute(a)));
14438
14438
assert_eq!(r, e);
14439
14439
}
14440
14440
14441
14441
#[simd_test(enable = "neon")]
14442
14442
unsafe fn test_vshrq_n_s16() {
14443
- let a: i16x8 = i16x8::new(4, 0 , 12, 0 , 20, 0 , 28, 0 );
14444
- let e: i16x8 = i16x8::new(1, 0 , 3, 0 , 5, 0 , 7, 0 );
14443
+ let a: i16x8 = i16x8::new(4, 8 , 12, 16 , 20, 24 , 28, 32 );
14444
+ let e: i16x8 = i16x8::new(1, 2 , 3, 4 , 5, 6 , 7, 8 );
14445
14445
let r: i16x8 = transmute(vshrq_n_s16::<2>(transmute(a)));
14446
14446
assert_eq!(r, e);
14447
14447
}
14448
14448
14449
14449
#[simd_test(enable = "neon")]
14450
14450
unsafe fn test_vshr_n_s32() {
14451
- let a: i32x2 = i32x2::new(4, 0 );
14452
- let e: i32x2 = i32x2::new(1, 0 );
14451
+ let a: i32x2 = i32x2::new(4, 8 );
14452
+ let e: i32x2 = i32x2::new(1, 2 );
14453
14453
let r: i32x2 = transmute(vshr_n_s32::<2>(transmute(a)));
14454
14454
assert_eq!(r, e);
14455
14455
}
14456
14456
14457
14457
#[simd_test(enable = "neon")]
14458
14458
unsafe fn test_vshrq_n_s32() {
14459
- let a: i32x4 = i32x4::new(4, 0 , 12, 0 );
14460
- let e: i32x4 = i32x4::new(1, 0 , 3, 0 );
14459
+ let a: i32x4 = i32x4::new(4, 8 , 12, 16 );
14460
+ let e: i32x4 = i32x4::new(1, 2 , 3, 4 );
14461
14461
let r: i32x4 = transmute(vshrq_n_s32::<2>(transmute(a)));
14462
14462
assert_eq!(r, e);
14463
14463
}
@@ -14472,56 +14472,56 @@ mod test {
14472
14472
14473
14473
#[simd_test(enable = "neon")]
14474
14474
unsafe fn test_vshrq_n_s64() {
14475
- let a: i64x2 = i64x2::new(4, 0 );
14476
- let e: i64x2 = i64x2::new(1, 0 );
14475
+ let a: i64x2 = i64x2::new(4, 8 );
14476
+ let e: i64x2 = i64x2::new(1, 2 );
14477
14477
let r: i64x2 = transmute(vshrq_n_s64::<2>(transmute(a)));
14478
14478
assert_eq!(r, e);
14479
14479
}
14480
14480
14481
14481
#[simd_test(enable = "neon")]
14482
14482
unsafe fn test_vshr_n_u8() {
14483
- let a: u8x8 = u8x8::new(4, 0 , 12, 0 , 20, 0 , 28, 0 );
14484
- let e: u8x8 = u8x8::new(1, 0 , 3, 0 , 5, 0 , 7, 0 );
14483
+ let a: u8x8 = u8x8::new(4, 8 , 12, 16 , 20, 24 , 28, 32 );
14484
+ let e: u8x8 = u8x8::new(1, 2 , 3, 4 , 5, 6 , 7, 8 );
14485
14485
let r: u8x8 = transmute(vshr_n_u8::<2>(transmute(a)));
14486
14486
assert_eq!(r, e);
14487
14487
}
14488
14488
14489
14489
#[simd_test(enable = "neon")]
14490
14490
unsafe fn test_vshrq_n_u8() {
14491
- let a: u8x16 = u8x16::new(4, 0 , 12, 0 , 20, 0 , 28, 0 , 36, 0 , 44, 0 , 52, 0 , 60, 0 );
14492
- let e: u8x16 = u8x16::new(1, 0 , 3, 0 , 5, 0 , 7, 0 , 9, 0 , 11, 0 , 13, 0 , 15, 0 );
14491
+ let a: u8x16 = u8x16::new(4, 8 , 12, 16 , 20, 24 , 28, 32 , 36, 40 , 44, 48 , 52, 56 , 60, 64 );
14492
+ let e: u8x16 = u8x16::new(1, 2 , 3, 4 , 5, 6 , 7, 8 , 9, 10 , 11, 12 , 13, 14 , 15, 16 );
14493
14493
let r: u8x16 = transmute(vshrq_n_u8::<2>(transmute(a)));
14494
14494
assert_eq!(r, e);
14495
14495
}
14496
14496
14497
14497
#[simd_test(enable = "neon")]
14498
14498
unsafe fn test_vshr_n_u16() {
14499
- let a: u16x4 = u16x4::new(4, 0 , 12, 0 );
14500
- let e: u16x4 = u16x4::new(1, 0 , 3, 0 );
14499
+ let a: u16x4 = u16x4::new(4, 8 , 12, 16 );
14500
+ let e: u16x4 = u16x4::new(1, 2 , 3, 4 );
14501
14501
let r: u16x4 = transmute(vshr_n_u16::<2>(transmute(a)));
14502
14502
assert_eq!(r, e);
14503
14503
}
14504
14504
14505
14505
#[simd_test(enable = "neon")]
14506
14506
unsafe fn test_vshrq_n_u16() {
14507
- let a: u16x8 = u16x8::new(4, 0 , 12, 0 , 20, 0 , 28, 0 );
14508
- let e: u16x8 = u16x8::new(1, 0 , 3, 0 , 5, 0 , 7, 0 );
14507
+ let a: u16x8 = u16x8::new(4, 8 , 12, 16 , 20, 24 , 28, 32 );
14508
+ let e: u16x8 = u16x8::new(1, 2 , 3, 4 , 5, 6 , 7, 8 );
14509
14509
let r: u16x8 = transmute(vshrq_n_u16::<2>(transmute(a)));
14510
14510
assert_eq!(r, e);
14511
14511
}
14512
14512
14513
14513
#[simd_test(enable = "neon")]
14514
14514
unsafe fn test_vshr_n_u32() {
14515
- let a: u32x2 = u32x2::new(4, 0 );
14516
- let e: u32x2 = u32x2::new(1, 0 );
14515
+ let a: u32x2 = u32x2::new(4, 8 );
14516
+ let e: u32x2 = u32x2::new(1, 2 );
14517
14517
let r: u32x2 = transmute(vshr_n_u32::<2>(transmute(a)));
14518
14518
assert_eq!(r, e);
14519
14519
}
14520
14520
14521
14521
#[simd_test(enable = "neon")]
14522
14522
unsafe fn test_vshrq_n_u32() {
14523
- let a: u32x4 = u32x4::new(4, 0 , 12, 0 );
14524
- let e: u32x4 = u32x4::new(1, 0 , 3, 0 );
14523
+ let a: u32x4 = u32x4::new(4, 8 , 12, 16 );
14524
+ let e: u32x4 = u32x4::new(1, 2 , 3, 4 );
14525
14525
let r: u32x4 = transmute(vshrq_n_u32::<2>(transmute(a)));
14526
14526
assert_eq!(r, e);
14527
14527
}
@@ -14536,8 +14536,8 @@ mod test {
14536
14536
14537
14537
#[simd_test(enable = "neon")]
14538
14538
unsafe fn test_vshrq_n_u64() {
14539
- let a: u64x2 = u64x2::new(4, 0 );
14540
- let e: u64x2 = u64x2::new(1, 0 );
14539
+ let a: u64x2 = u64x2::new(4, 8 );
14540
+ let e: u64x2 = u64x2::new(1, 2 );
14541
14541
let r: u64x2 = transmute(vshrq_n_u64::<2>(transmute(a)));
14542
14542
assert_eq!(r, e);
14543
14543
}
0 commit comments