Skip to content

Commit 4e4f839

Browse files
committed
[X86] Use the unaligned vector typedefs for the lddqu intrinsics pointer 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
1 parent 6864d27 commit 4e4f839

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

clang/lib/Headers/avxintrin.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3177,7 +3177,7 @@ _mm256_loadu_si256(__m256i_u const *__p)
31773177
/// A pointer to a 256-bit integer vector containing integer values.
31783178
/// \returns A 256-bit integer vector containing the moved values.
31793179
static __inline __m256i __DEFAULT_FN_ATTRS
3180-
_mm256_lddqu_si256(__m256i const *__p)
3180+
_mm256_lddqu_si256(__m256i_u const *__p)
31813181
{
31823182
return (__m256i)__builtin_ia32_lddqu256((char const *)__p);
31833183
}

clang/lib/Headers/pmmintrin.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@
3535
/// A pointer to a 128-bit integer vector containing integer values.
3636
/// \returns A 128-bit vector containing the moved values.
3737
static __inline__ __m128i __DEFAULT_FN_ATTRS
38-
_mm_lddqu_si128(__m128i const *__p)
38+
_mm_lddqu_si128(__m128i_u const *__p)
3939
{
4040
return (__m128i)__builtin_ia32_lddqu((char const *)__p);
4141
}

0 commit comments

Comments
 (0)