annotate gcc/testsuite/gcc.target/powerpc/vec-stril-9.c @ 19:2b5abeee2509 default tip

update gcc11
author anatofuz
date Mon, 25 May 2020 07:50:57 +0900
parents
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
19
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
1 /* { dg-do compile } */
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
2 /* { dg-options "-O2 -mdejagnu-cpu=future" } */
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
3
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
4 #include <altivec.h>
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
5
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
6 vector unsigned char
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
7 doString(vector unsigned char *vp)
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
8 {
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
9 /* Though two built-in functions are called, the implementation
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
10 should use a single instruction to implement both and should
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
11 convert tail recursion to iteration with two copies of the "loop
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
12 body" when compiled with -O2 or -O3. */
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
13 vector unsigned char result = vec_stril (*vp);
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
14 if (vec_stril_p (*vp))
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
15 return result;
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
16 else
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
17 return doString (vp + 1);
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
18 }
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
19
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
20 /* Enforce that exactly two dot-form instructions which are properly biased
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
21 for the target's endianness implement this built-in. */
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
22
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
23 /* { dg-final { scan-assembler-times {\mvstribl\.} 2 { target { be } } } } */
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
24 /* { dg-final { scan-assembler-times {\mvstribl\M[^.]} 0 { target { be } } } } */
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
25 /* { dg-final { scan-assembler-times {\mvstribr} 0 { target { be } } } } */
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
26 /* { dg-final { scan-assembler-times {\mvstribr\.} 2 { target { le } } } } */
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
27 /* { dg-final { scan-assembler-times {\mvstribr\M[^.]} 0 { target { le } } } } */
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
28 /* { dg-final { scan-assembler-times {\mvstribl} 0 { target { le } } } } */