+2019-05-28 Segher Boessenkool <segher@kernel.crashing.org>
+
+ * gcc.target/powerpc/p9-dimode1.c: Don't restrict to -m64. Check for
+ all mtvsr*, not just mtvsrd. Use "wa" instead of "wi" constraints.
+ * gcc.target/powerpc/p9-dimode2.c: Ditto.
+
2019-05-28 Martin Liska <mliska@suse.cz>
PR ipa/90555
-/* { dg-do compile { target { powerpc64*-*-* && lp64 } } } */
+/* { dg-do compile { target { powerpc*-*-* } } } */
/* { dg-require-effective-target powerpc_p9vector_ok } */
/* { dg-options "-mdejagnu-cpu=power9 -O2" } */
/* Verify P9 changes to allow DImode into Altivec registers, and generate
constants using XXSPLTIB. */
-#ifndef _ARCH_PPC64
-#error "This code is 64-bit."
-#endif
-
double
p9_zero (void)
{
long l = 0;
double ret;
- __asm__ ("xxlor %x0,%x1,%x1" : "=&d" (ret) : "wi" (l));
+ __asm__ ("xxlor %x0,%x1,%x1" : "=&d" (ret) : "wa" (l));
return ret;
}
long l = 1;
double ret;
- __asm__ ("xxlor %x0,%x1,%x1" : "=&d" (ret) : "wi" (l));
+ __asm__ ("xxlor %x0,%x1,%x1" : "=&d" (ret) : "wa" (l));
return ret;
}
long l = -1;
double ret;
- __asm__ ("xxlor %x0,%x1,%x1" : "=&d" (ret) : "wi" (l));
+ __asm__ ("xxlor %x0,%x1,%x1" : "=&d" (ret) : "wa" (l));
return ret;
}
/* { dg-final { scan-assembler {\mxxspltib\M} } } */
-/* { dg-final { scan-assembler-not {\mmtvsrd\M} } } */
+/* { dg-final { scan-assembler-not {\mmtvsr} } } */
/* { dg-final { scan-assembler-not {\mlfd\M} } } */
/* { dg-final { scan-assembler-not {\mld\M} } } */
/* { dg-final { scan-assembler-not {\mlxsd\M} } } */
-/* { dg-do compile { target { powerpc64*-*-* && lp64 } } } */
+/* { dg-do compile { target { powerpc*-*-* } } } */
/* { dg-require-effective-target powerpc_p9vector_ok } */
/* { dg-options "-mdejagnu-cpu=power9 -O2" } */
-/* Verify that large integer constants are loaded via direct move instead of being
- loaded from memory. */
-
-#ifndef _ARCH_PPC64
-#error "This code is 64-bit."
-#endif
+/* Verify that large integer constants are loaded via direct move instead of
+ being loaded from memory. */
double
p9_large (void)
long l = 0x12345678;
double ret;
- __asm__ ("xxlor %x0,%x1,%x1" : "=&d" (ret) : "wi" (l));
+ __asm__ ("xxlor %x0,%x1,%x1" : "=&d" (ret) : "wa" (l));
return ret;
}
-/* { dg-final { scan-assembler {\mmtvsrd\M} } } */
+/* { dg-final { scan-assembler {\mmtvsr} } } */
/* { dg-final { scan-assembler-not {\mld\M} } } */
/* { dg-final { scan-assembler-not {\mlfd\M} } } */
/* { dg-final { scan-assembler-not {\mlxsd\M} } } */