https://gcc.gnu.org/bugzilla/show_bug.cgi?id=126866
--- Comment #2 from Surya Kumari Jangala <jskumari at gcc dot gnu.org> ---
The behavior of __builtin_mma_assemble_pair() is correct on both LE and BE. The
testcase needs to be changed.
__builtin_mma_assemble_pair(dst, src1, src2) places src1 into the even-numbered
register of the pair and src2 into the odd-numbered register.
For the following testcase:
typedef unsigned char vec_t __attribute__((vector_size(16)));
foo (__vector_pair *dst, vec_t *src)
{
__vector_pair pair;
__builtin_mma_assemble_pair (&pair, src[0], src[4]);
*dst = pair;
}
Code generated on LE:
lxv 0,0(4)
lxv 1,64(4)
stxvp 0,0(3)
blr
Code generated on BE:
lxv 0,0(4)
lxv 1,64(4)
stxvp 0,0(3)
blr
And this is as expected. The endianness is being handled correctly by the
backend.