[testsuite] require sqrt_insn effective target where needed
[official-gcc.git] / gcc / testsuite / gcc.target / powerpc / vec-splat-constant-v16qi.c
blob27764ddbc83e8289443c741732124b6fdf4adcb4
1 /* { dg-do compile } */
2 /* { dg-require-effective-target power10_ok } */
3 /* { dg-options "-mdejagnu-cpu=power10 -O2" } */
5 #include <altivec.h>
7 /* Test whether XXSPLTIW is generated for V16HI vector constants where the
8 first 4 elements are the same as the next 4 elements, etc. */
10 vector unsigned char
11 v16qi_const_1 (void)
13 return (vector unsigned char) { 1, 1, 1, 1, 1, 1, 1, 1,
14 1, 1, 1, 1, 1, 1, 1, 1, }; /* VSLTPISB. */
17 vector unsigned char
18 v16qi_const_2 (void)
20 return (vector unsigned char) { 1, 2, 3, 4, 1, 2, 3, 4,
21 1, 2, 3, 4, 1, 2, 3, 4, }; /* XXSPLTIW. */
24 /* { dg-final { scan-assembler-times {\mxxspltiw\M} 1 } } */
25 /* { dg-final { scan-assembler-times {\mvspltisb\M|\mxxspltib\M} 1 } } */
26 /* { dg-final { scan-assembler-not {\mlxvx?\M} } } */
27 /* { dg-final { scan-assembler-not {\mplxv\M} } } */