Patch V10 #10 is a modification of patch V8 #1.  I renamed the files from
paddi-?.c to prefixed-*.c so that there isn't a false match due to the .ident
directive.

This test passes when I do a make check.  One patch V10 #9 is checked in can I
commit this patch?

2019-12-11  Michael Meissner  <meiss...@linux.ibm.com>

        * gcc.target/powerpc/prefix-add.c: New test for -mcpu=future
        generating PADDI for large constant adds.
        * gcc.target/powerpc/prefix-di-constant.c: New test for
        -mcpu=future generating PLI to load up large DImode constants.
        * gcc.target/powerpc/prefix-si-constant.c: New test for
        -mcpu=future generating PLI to load up large SImode constants.

Index: gcc/testsuite/gcc.target/powerpc/prefix-add.c
===================================================================
--- gcc/testsuite/gcc.target/powerpc/prefix-add.c       (revision 279252)
+++ gcc/testsuite/gcc.target/powerpc/prefix-add.c       (working copy)
@@ -0,0 +1,12 @@
+/* { dg-do compile } */
+/* { dg-require-effective-target powerpc_prefixed_addr } */
+/* { dg-options "-O2 -mdejagnu-cpu=future" } */
+
+/* Test that PADDI is generated to add a large constant.  */
+unsigned long
+add (unsigned long a)
+{
+  return a + 0x12345678UL;
+}
+
+/* { dg-final { scan-assembler {\mpaddi\M} } } */
Index: gcc/testsuite/gcc.target/powerpc/prefix-di-constant.c
===================================================================
--- gcc/testsuite/gcc.target/powerpc/prefix-di-constant.c       (revision 
279252)
+++ gcc/testsuite/gcc.target/powerpc/prefix-di-constant.c       (working copy)
@@ -0,0 +1,12 @@
+/* { dg-do compile } */
+/* { dg-require-effective-target powerpc_prefixed_addr } */
+/* { dg-options "-O2 -mdejagnu-cpu=future" } */
+
+/* Test that PLI (PADDI) is generated to load a large constant.  */
+unsigned long
+large (void)
+{
+  return 0x12345678UL;
+}
+
+/* { dg-final { scan-assembler {\mpli\M} } } */
Index: gcc/testsuite/gcc.target/powerpc/prefix-si-constant.c
===================================================================
--- gcc/testsuite/gcc.target/powerpc/prefix-si-constant.c       (revision 
279252)
+++ gcc/testsuite/gcc.target/powerpc/prefix-si-constant.c       (working copy)
@@ -0,0 +1,12 @@
+/* { dg-do compile } */
+/* { dg-require-effective-target powerpc_prefixed_addr } */
+/* { dg-options "-O2 -mdejagnu-cpu=future" } */
+
+/* Test that PLI (PADDI) is generated to load a large constant for SImode.  */
+void
+large_si (unsigned int *p)
+{
+  *p = 0x12345U;
+}
+
+/* { dg-final { scan-assembler {\mpli\M} } } */

-- 
Michael Meissner, IBM
IBM, M/S 2506R, 550 King Street, Littleton, MA 01460-6245, USA
email: meiss...@linux.ibm.com, phone: +1 (978) 899-4797

Reply via email to