c++: normalizing ttp constraints [PR115656]
[official-gcc.git] / gcc / testsuite / gcc.target / powerpc / vec-strir-8.c
blobc9db0f9e039fc423b7ea9a57ca7986f75501970d
1 /* { dg-do compile } */
2 /* { dg-options "-O1 -mdejagnu-cpu=power10" } */
3 /* See vec-strir-9.c for the same test with -O2 optimization. */
5 #include <altivec.h>
7 vector unsigned char
8 doString(vector unsigned char *vp)
10 /* Though two built-in functions are called, the implementation
11 should use a single instruction to implement both with -O1. */
12 vector unsigned char result = vec_strir (*vp);
13 if (vec_strir_p (*vp))
14 return result;
15 else
16 return doString (vp + 1);
19 /* Enforce that a single dot-form instruction which is properly biased
20 for the target's endianness implements this built-in. */
22 /* { dg-final { scan-assembler-times {\mvstribr\.} 1 { target { be } } } } */
23 /* { dg-final { scan-assembler-times {\mvstribr\M[^.]} 0 { target { be } } } } */
24 /* { dg-final { scan-assembler-times {\mvstribl} 0 { target { be } } } } */
25 /* { dg-final { scan-assembler-times {\mvstribl\.} 1 { target { le } } } } */
26 /* { dg-final { scan-assembler-times {\mvstribl\M[^.]} 0 { target { le } } } } */
27 /* { dg-final { scan-assembler-times {\mvstribr} 0 { target { le } } } } */