Skip to content

Commit

Permalink
Merge pull request #13 from howjmay/vmov_n_s8
Browse files Browse the repository at this point in the history
feat: Add vmov_n_s8
  • Loading branch information
howjmay authored Oct 27, 2023
2 parents 4080cab + efae396 commit 527d1e6
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 deletions.
6 changes: 2 additions & 4 deletions neon2rvv.h
Original file line number Diff line number Diff line change
Expand Up @@ -1761,9 +1761,7 @@ FORCE_INLINE uint8x8_t vcgt_s8(int8x8_t __a, int8x8_t __b) {

// FORCE_INLINE uint64x1_t vcreate_u64(uint64_t __a);

FORCE_INLINE int8x8_t vdup_n_s8(int8_t __a) {
return __riscv_vmv_s_x_i8mf2(__a, 8);
}
FORCE_INLINE int8x8_t vdup_n_s8(int8_t __a) { return __riscv_vmv_s_x_i8mf2(__a, 8); }

// FORCE_INLINE int16x4_t vdup_n_s16(int16_t __a);

Expand Down Expand Up @@ -1799,7 +1797,7 @@ FORCE_INLINE int8x8_t vdup_n_s8(int8_t __a) {

// FORCE_INLINE uint64x2_t vdupq_n_u64(uint64_t __a);

// FORCE_INLINE int8x8_t vmov_n_s8(int8_t __a);
FORCE_INLINE int8x8_t vmov_n_s8(int8_t __a) { return vdup_n_s8(__a); }

// FORCE_INLINE int16x4_t vmov_n_s16(int16_t __a);

Expand Down
6 changes: 5 additions & 1 deletion tests/impl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2318,7 +2318,11 @@ result_t test_vdupq_n_s64(const NEON2RVV_TEST_IMPL &impl, uint32_t iter) { retur

result_t test_vdupq_n_u64(const NEON2RVV_TEST_IMPL &impl, uint32_t iter) { return TEST_UNIMPL; }

result_t test_vmov_n_s8(const NEON2RVV_TEST_IMPL &impl, uint32_t iter) { return TEST_UNIMPL; }
result_t test_vmov_n_s8(const NEON2RVV_TEST_IMPL &impl, uint32_t iter) {
const int8_t _a = impl.test_cases_ints[0];
int8x8_t c = vmov_n_s8(_a);
return validate_int8(c, _a, _a, _a, _a, _a, _a, _a, _a);
}

result_t test_vmov_n_s16(const NEON2RVV_TEST_IMPL &impl, uint32_t iter) { return TEST_UNIMPL; }

Expand Down

0 comments on commit 527d1e6

Please sign in to comment.