1 /* { dg-do compile } */
2 /* { dg-require-effective-target power10_ok } */
3 /* { dg-options "-Wno-psabi -mdejagnu-cpu=power10 -O2" } */
5 typedef unsigned char vec_t
__attribute__((vector_size(16)));
8 foo (__vector_quad
*dst
, vec_t
*src
)
11 __builtin_mma_assemble_acc (&acc
, src
[0], src
[4], src
[8], src
[12]);
16 foo2 (__vector_quad
*dst
, vec_t
*src
)
19 __builtin_mma_build_acc (&acc
, src
[12], src
[8], src
[4], src
[0]);
24 bar (vec_t
*dst
, __vector_quad
*src
)
27 __builtin_mma_disassemble_acc (res
, src
);
34 #if !__has_builtin (__builtin_mma_assemble_acc)
35 # error "__has_builtin (__builtin_mma_assemble_acc) failed"
38 #if !__has_builtin (__builtin_mma_build_acc)
39 # error "__has_builtin (__builtin_mma_build_acc) failed"
42 /* { dg-final { scan-assembler-times {\mlxv\M} 8 } } */
43 /* { dg-final { scan-assembler-times {\mlxvp\M} 2 } } */
44 /* { dg-final { scan-assembler-times {\mstxv\M} 4 } } */
45 /* { dg-final { scan-assembler-times {\mstxvp\M} 4 } } */
46 /* { dg-final { scan-assembler-times {\mxxmfacc\M} 3 } } */
47 /* { dg-final { scan-assembler-times {\mxxmtacc\M} 3 } } */