Skip to content

Commit

Permalink
Merge pull request #523 from HowJMay/fix-alignment
Browse files Browse the repository at this point in the history
fix: Fix alignment in tests
  • Loading branch information
jserv authored Mar 23, 2022
2 parents e08a1a3 + efc3491 commit f6c2ebe
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions tests/impl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
#include <assert.h>
#include <float.h>
#include <math.h>
#include <stdalign.h>
#include <stdint.h>
#include <stdio.h>
#include <stdlib.h>
Expand Down Expand Up @@ -2963,7 +2964,7 @@ result_t test_mm_stream_ps(const SSE2NEONTestImpl &impl, uint32_t iter)
{
const float *_a = impl.mTestFloatPointer1;
__m128 a = load_m128(_a);
float p[4];
alignas(16) float p[4];

_mm_stream_ps(p, a);
ASSERT_RETURN(p[0] == _a[0]);
Expand Down Expand Up @@ -6197,7 +6198,7 @@ result_t test_mm_store_sd(const SSE2NEONTestImpl &impl, uint32_t iter)
result_t test_mm_store_si128(const SSE2NEONTestImpl &impl, uint32_t iter)
{
const int32_t *_a = (const int32_t *) impl.mTestIntPointer1;
int32_t p[4];
alignas(16) int32_t p[4];

__m128i a = load_m128i(_a);
_mm_store_si128((__m128i *) p, a);
Expand Down Expand Up @@ -6312,7 +6313,7 @@ result_t test_mm_stream_pd(const SSE2NEONTestImpl &impl, uint32_t iter)
result_t test_mm_stream_si128(const SSE2NEONTestImpl &impl, uint32_t iter)
{
const int32_t *_a = (const int32_t *) impl.mTestIntPointer1;
int32_t p[4];
alignas(16) int32_t p[4];

__m128i a = load_m128i(_a);
_mm_stream_si128((__m128i *) p, a);
Expand Down

0 comments on commit f6c2ebe

Please sign in to comment.