comparison 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
comparison
equal deleted inserted replaced
18:1830386684a0 19:2b5abeee2509
1 /* { dg-do compile } */
2 /* { dg-options "-O2 -mdejagnu-cpu=future" } */
3
4 #include <altivec.h>
5
6 vector unsigned char
7 doString(vector unsigned char *vp)
8 {
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 unsigned char result = vec_stril (*vp);
14 if (vec_stril_p (*vp))
15 return result;
16 else
17 return doString (vp + 1);
18 }
19
20 /* Enforce that exactly two dot-form instructions which are properly biased
21 for the target's endianness implement this built-in. */
22
23 /* { dg-final { scan-assembler-times {\mvstribl\.} 2 { target { be } } } } */
24 /* { dg-final { scan-assembler-times {\mvstribl\M[^.]} 0 { target { be } } } } */
25 /* { dg-final { scan-assembler-times {\mvstribr} 0 { target { be } } } } */
26 /* { dg-final { scan-assembler-times {\mvstribr\.} 2 { target { le } } } } */
27 /* { dg-final { scan-assembler-times {\mvstribr\M[^.]} 0 { target { le } } } } */
28 /* { dg-final { scan-assembler-times {\mvstribl} 0 { target { le } } } } */