* gcc.target/powerpc/builtins-1-be.c <vclzb>: Rename duplicate test
[official-gcc.git] / gcc / testsuite / gcc.target / powerpc / p9-dimode1.c
blob64f0e31fb00d4754d00b2f5d66a7bc17cca44fb8
1 /* { dg-do compile { target { powerpc64*-*-* && lp64 } } } */
2 /* { dg-skip-if "do not override -mcpu" { powerpc*-*-* } { "-mcpu=*" } { "-mcpu=power9" } } */
3 /* { dg-require-effective-target powerpc_p9vector_ok } */
4 /* { dg-options "-mcpu=power9 -O2" } */
6 /* Verify P9 changes to allow DImode into Altivec registers, and generate
7 constants using XXSPLTIB. */
9 #ifndef _ARCH_PPC64
10 #error "This code is 64-bit."
11 #endif
13 double
14 p9_zero (void)
16 long l = 0;
17 double ret;
19 __asm__ ("xxlor %x0,%x1,%x1" : "=&d" (ret) : "wi" (l));
21 return ret;
24 double
25 p9_plus_1 (void)
27 long l = 1;
28 double ret;
30 __asm__ ("xxlor %x0,%x1,%x1" : "=&d" (ret) : "wi" (l));
32 return ret;
35 double
36 p9_minus_1 (void)
38 long l = -1;
39 double ret;
41 __asm__ ("xxlor %x0,%x1,%x1" : "=&d" (ret) : "wi" (l));
43 return ret;
46 /* { dg-final { scan-assembler {\mxxspltib\M} } } */
47 /* { dg-final { scan-assembler-not {\mmtvsrd\M} } } */
48 /* { dg-final { scan-assembler-not {\mlfd\M} } } */
49 /* { dg-final { scan-assembler-not {\mld\M} } } */
50 /* { dg-final { scan-assembler-not {\mlxsd\M} } } */