@@ -847,7 +847,6 @@ result_t test_vraddhn_s16(const NEON2RVV_TEST_IMPL &impl, uint32_t iter) {
847
847
const int16_t *_a = (int16_t *)impl.test_cases_int_pointer1 ;
848
848
const int16_t *_b = (int16_t *)impl.test_cases_int_pointer2 ;
849
849
int8_t _c[8 ];
850
-
851
850
const int16_t round = 1 << 7 ;
852
851
for (int i = 0 ; i < 8 ; i++) {
853
852
_c[i] = ((_a[i] + _b[i] + round) >> 8 ) & 0xff ;
@@ -856,7 +855,6 @@ result_t test_vraddhn_s16(const NEON2RVV_TEST_IMPL &impl, uint32_t iter) {
856
855
int16x8_t a = vld1q_s16 (_a);
857
856
int16x8_t b = vld1q_s16 (_b);
858
857
int8x8_t c = vraddhn_s16 (a, b);
859
-
860
858
return validate_int8 (c, _c[0 ], _c[1 ], _c[2 ], _c[3 ], _c[4 ], _c[5 ], _c[6 ], _c[7 ]);
861
859
}
862
860
@@ -1566,7 +1564,20 @@ result_t test_vsubhn_u32(const NEON2RVV_TEST_IMPL &impl, uint32_t iter) { return
1566
1564
1567
1565
result_t test_vsubhn_u64 (const NEON2RVV_TEST_IMPL &impl, uint32_t iter) { return TEST_UNIMPL; }
1568
1566
1569
- result_t test_vrsubhn_s16 (const NEON2RVV_TEST_IMPL &impl, uint32_t iter) { return TEST_UNIMPL; }
1567
+ result_t test_vrsubhn_s16 (const NEON2RVV_TEST_IMPL &impl, uint32_t iter) {
1568
+ const int16_t *_a = (int16_t *)impl.test_cases_int_pointer1 ;
1569
+ const int16_t *_b = (int16_t *)impl.test_cases_int_pointer2 ;
1570
+ int8_t _c[8 ];
1571
+ const int16_t round = 1 << 7 ;
1572
+ for (int i = 0 ; i < 8 ; i++) {
1573
+ _c[i] = ((_a[i] - _b[i] + round) >> 8 ) & 0xff ;
1574
+ }
1575
+
1576
+ int16x8_t a = vld1q_s16 (_a);
1577
+ int16x8_t b = vld1q_s16 (_b);
1578
+ int8x8_t c = vrsubhn_s16 (a, b);
1579
+ return validate_int8 (c, _c[0 ], _c[1 ], _c[2 ], _c[3 ], _c[4 ], _c[5 ], _c[6 ], _c[7 ]);
1580
+ }
1570
1581
1571
1582
result_t test_vrsubhn_s32 (const NEON2RVV_TEST_IMPL &impl, uint32_t iter) { return TEST_UNIMPL; }
1572
1583
0 commit comments