Debian Codegraph @

gcc/testsuite/gcc.target/powerpc/p9-dimode1.c

raw
1 /* { dg-do compile } */
2 /* { dg-options "-mdejagnu-cpu=power9 -mvsx -O2" } */
3 /* { dg-require-effective-target powerpc_vsx } */
4
5 /* Verify P9 changes to allow DImode into Altivec registers, and generate
6 constants using XXSPLTIB. */
7
8 double
9 p9_zero (void)
10 {
11 long l = 0;
12 double ret;
13
14 __asm__ ("xxlor %x0,%x1,%x1" : "=&d" (ret) : "wa" (l));
15
16 return ret;
17 }
18
19 double
20 p9_plus_1 (void)
21 {
22 long l = 1;
23 double ret;
24
25 __asm__ ("xxlor %x0,%x1,%x1" : "=&d" (ret) : "wa" (l));
26
27 return ret;
28 }
29
30 double
31 p9_minus_1 (void)
32 {
33 long l = -1;
34 double ret;
35
36 __asm__ ("xxlor %x0,%x1,%x1" : "=&d" (ret) : "wa" (l));
37
38 return ret;
39 }
40
41 /* { dg-final { scan-assembler {\mxxspltib\M} } } */
42 /* { dg-final { scan-assembler-not {\mmtvsr} } } */
43 /* { dg-final { scan-assembler-not {\mlfd\M} } } */
44 /* { dg-final { scan-assembler-not {\mld\M} } } */
45 /* { dg-final { scan-assembler-not {\mlxsd\M} } } */