comparison gcc/testsuite/gcc.target/powerpc/vec-strir-12.c @ 152:2b5abeee2509

update gcc11
author anatofuz
date Mon, 25 May 2020 07:50:57 +0900
parents
children
comparison
equal deleted inserted replaced
145:1830386684a0 152:2b5abeee2509
1 /* { dg-do compile } */
2 /* { dg-options "-O1 -mdejagnu-cpu=future" } */
3 /* See vec-strir-13.c for the same test with -O2 optimization. */
4
5 #include <altivec.h>
6
7 vector unsigned short
8 doString(vector unsigned short *vp)
9 {
10 /* Though two built-in functions are called, the implementation
11 should use a single instruction to implement both with -O1. */
12 vector unsigned short result = vec_strir (*vp);
13 if (vec_strir_p (*vp))
14 return result;
15 else
16 return doString (vp + 1);
17 }
18
19 /* Enforce that a single dot-form instruction which is properly biased
20 for the target's endianness implements this built-in. */
21
22 /* { dg-final { scan-assembler-times {\mvstrihr\.} 1 { target { be } } } } */
23 /* { dg-final { scan-assembler-times {\mvstrihr\M[^.]} 0 { target { be } } } } */
24 /* { dg-final { scan-assembler-times {\mvstrihl} 0 { target { be } } } } */
25 /* { dg-final { scan-assembler-times {\mvstrihl\.} 1 { target { le } } } } */
26 /* { dg-final { scan-assembler-times {\mvstrihl\M[^.]} 0 { target { le } } } } */
27 /* { dg-final { scan-assembler-times {\mvstrihr} 0 { target { le } } } } */
28