Skip to content

Commit c9ce37d

Browse files
author
Chip Kerchner
committed
Force vector pairs in clang.
1 parent 89a12fa commit c9ce37d

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

kernel/power/gemm_common.c

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,11 @@ FORCEINLINE void vec_load_pair(vec_f32 *dst, vec_f32 *src)
4646
{
4747
#ifdef USE_VECTOR_PAIRS
4848
__vector_pair vy0p;
49+
#ifdef __clang__
50+
vy0p = __builtin_vsx_lxvp(0L, (const __vector_pair *)(src));
51+
#else
4952
vy0p = *(__vector_pair *)(src);
53+
#endif
5054
__builtin_vsx_disassemble_pair((void *)(dst), &vy0p);
5155
#else
5256
dst[0] = src[0];
@@ -59,7 +63,11 @@ FORCEINLINE void vec_store_pair(vec_f32 *dst, vec_f32 *src)
5963
#ifdef USE_VECTOR_PAIRS
6064
__vector_pair vy0p;
6165
__builtin_vsx_assemble_pair2(&vy0p, (vec_uc8)src[1], (vec_uc8)src[0]);
66+
#ifdef __clang__
67+
__builtin_vsx_stxvp(vy0p, 0L, (__vector_pair *)(dst));
68+
#else
6269
*(__vector_pair *)(dst) = vy0p;
70+
#endif
6371
#else
6472
dst[0] = src[0];
6573
dst[1] = src[1];

0 commit comments

Comments
 (0)