[testsuite] require sqrt_insn effective target where needed
[official-gcc.git] / gcc / testsuite / gcc.target / powerpc / vec-strir-11.c
blob337450e867440786e1a25fae96177674268b4332
1 /* { dg-do compile } */
2 /* { dg-options "-O2 -mdejagnu-cpu=power10" } */
4 #include <altivec.h>
6 vector signed char
7 doString(vector signed char *vp)
9 /* Though two built-in functions are called, the implementation
10 should use a single instruction to implement both and should
11 convert tail recursion to iteration with two copies of the "loop
12 body" when compiled with -O2 or -O3. */
13 vector signed char result = vec_strir (*vp);
14 if (vec_strir_p (*vp))
15 return result;
16 else
17 return doString (vp + 1);
20 /* Enforce that exactly two dot-form instructions which are properly biased
21 for the target's endianness implement this built-in. */
23 /* { dg-final { scan-assembler-times {\mvstribr\.} 2 { target { be } } } } */
24 /* { dg-final { scan-assembler-times {\mvstribr\M[^.]} 0 { target { be } } } } */
25 /* { dg-final { scan-assembler-times {\mvstribl} 0 { target { be } } } } */
26 /* { dg-final { scan-assembler-times {\mvstribl\.} 2 { target { le } } } } */
27 /* { dg-final { scan-assembler-times {\mvstribl\M[^.]} 0 { target { le } } } } */
28 /* { dg-final { scan-assembler-times {\mvstribr} 0 { target { le } } } } */