Skip to content

Commit

Permalink
[X86] Use the unaligned vector typedefs for the lddqu intrinsics poin…
Browse files Browse the repository at this point in the history
…ter arguments (PR20670)

Extension to 4390c72 - similar to the vanilla load/store intrinsics, _mm_lddqu_si128/_mm256_lddqu_si256 should take an unaligned pointer, but were using the aligned m128i/m256i types which can cause alignment warnings.

The existing sse3-builtins.c and avx-builtins.c tests in llvm-project\clang\test\CodeGen\X86 should cover this.

Differential Revision: https://reviews.llvm.org/D121815
  • Loading branch information
RKSimon committed Mar 17, 2022
1 parent 6864d27 commit 4e4f839
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion clang/lib/Headers/avxintrin.h
Original file line number Diff line number Diff line change
Expand Up @@ -3177,7 +3177,7 @@ _mm256_loadu_si256(__m256i_u const *__p)
/// A pointer to a 256-bit integer vector containing integer values.
/// \returns A 256-bit integer vector containing the moved values.
static __inline __m256i __DEFAULT_FN_ATTRS
_mm256_lddqu_si256(__m256i const *__p)
_mm256_lddqu_si256(__m256i_u const *__p)
{
return (__m256i)__builtin_ia32_lddqu256((char const *)__p);
}
Expand Down
2 changes: 1 addition & 1 deletion clang/lib/Headers/pmmintrin.h
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
/// A pointer to a 128-bit integer vector containing integer values.
/// \returns A 128-bit vector containing the moved values.
static __inline__ __m128i __DEFAULT_FN_ATTRS
_mm_lddqu_si128(__m128i const *__p)
_mm_lddqu_si128(__m128i_u const *__p)
{
return (__m128i)__builtin_ia32_lddqu((char const *)__p);
}
Expand Down

0 comments on commit 4e4f839

Please sign in to comment.