Commit 34136823 authored by Russell Graves's avatar Russell Graves Committed by Michael R. Crusoe

Fix vqshlud_n_s64 implementation to be 64-bit.

The scalar vqshlud_n_s64 function was wrong, and there was no test
case for it (or the scalar 32 bit form).  Add test cases for the
scalar functions (test vectors generated on GCE ARMv9 system),
validate the fix for the 64-bit scalar form.
parent 483a4bcc
...@@ -94,8 +94,8 @@ SIMDE_FUNCTION_ATTRIBUTES ...@@ -94,8 +94,8 @@ SIMDE_FUNCTION_ATTRIBUTES
uint64_t uint64_t
simde_vqshlud_n_s64(int64_t a, const int n) simde_vqshlud_n_s64(int64_t a, const int n)
SIMDE_REQUIRE_CONSTANT_RANGE(n, 0, 63) { SIMDE_REQUIRE_CONSTANT_RANGE(n, 0, 63) {
uint32_t r = HEDLEY_STATIC_CAST(uint32_t, a << n); uint64_t r = HEDLEY_STATIC_CAST(uint64_t, a << n);
r |= (((r >> n) != HEDLEY_STATIC_CAST(uint32_t, a)) ? UINT32_MAX : 0); r |= (((r >> n) != HEDLEY_STATIC_CAST(uint64_t, a)) ? UINT64_MAX : 0);
return (a < 0) ? 0 : r; return (a < 0) ? 0 : r;
} }
#if defined(SIMDE_ARM_NEON_A64V8_NATIVE) #if defined(SIMDE_ARM_NEON_A64V8_NATIVE)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment