[ARM] Fix small multiply feature
authorThomas Preud'homme <thomas.preudhomme@arm.com>
Tue, 4 Apr 2017 16:24:18 +0000 (16:24 +0000)
committerThomas Preud'homme <thopre01@gcc.gnu.org>
Tue, 4 Apr 2017 16:24:18 +0000 (16:24 +0000)
2017-04-03  Thomas Preud'homme  <thomas.preudhomme@arm.com>

    gcc/
    PR target/80307
    * config/arm/arm.c (thumb1_rtx_costs): Give a cost of 32
    instructions for small multiply cores.

    gcc/testsuite/
    PR target/80307
    * gcc.target/arm/small-multiply-m0-1.c: Do not skip test if not
    targeting any CPU or architecture.
    * gcc.target/arm/small-multiply-m0-2.c: Likewise.
    * gcc.target/arm/small-multiply-m0-3.c: Likewise.
    * gcc.target/arm/small-multiply-m0plus-1.c: Likewise.
    * gcc.target/arm/small-multiply-m0plus-2.c: Likewise.
    * gcc.target/arm/small-multiply-m0plus-3.c: Likewise.
    * gcc.target/arm/small-multiply-m1-1.c: Likewise.
    * gcc.target/arm/small-multiply-m1-2.c: Likewise.
    * gcc.target/arm/small-multiply-m1-3.c: Likewise.

From-SVN: r246682

12 files changed:
gcc/ChangeLog
gcc/config/arm/arm.c
gcc/testsuite/ChangeLog
gcc/testsuite/gcc.target/arm/small-multiply-m0-1.c
gcc/testsuite/gcc.target/arm/small-multiply-m0-2.c
gcc/testsuite/gcc.target/arm/small-multiply-m0-3.c
gcc/testsuite/gcc.target/arm/small-multiply-m0plus-1.c
gcc/testsuite/gcc.target/arm/small-multiply-m0plus-2.c
gcc/testsuite/gcc.target/arm/small-multiply-m0plus-3.c
gcc/testsuite/gcc.target/arm/small-multiply-m1-1.c
gcc/testsuite/gcc.target/arm/small-multiply-m1-2.c
gcc/testsuite/gcc.target/arm/small-multiply-m1-3.c

index c207588248446c51ae6764f6fffb7355b7a8017f..4136a2922b904deae39b74f9d94e1f993f6376ec 100644 (file)
@@ -1,10 +1,16 @@
+2017-04-04  Thomas Preud'homme  <thomas.preudhomme@arm.com>
+
+       PR target/80307
+       * config/arm/arm.c (thumb1_rtx_costs): Give a cost of 32
+       instructions for small multiply cores.
+
 2017-04-04  Jeff Law  <law@redhat.com>
 
        * config/mips/mips.c (mips_multi_add): Zero initialize the newly
        added member.
        (mips_expand_vec_perm_const): Initialize elements in orig_perm
        that are not set by the loop over the elements.
-       
+
 2017-04-04  Jakub Jelinek  <jakub@redhat.com>
 
        PR target/80286
index bc1e607c42c9ba12a473e4df8ef51f788e041f62..931c72d46f58f623d38ca445abfc5b241a990a10 100644 (file)
@@ -8727,6 +8727,9 @@ thumb1_rtx_costs (rtx x, enum rtx_code code, enum rtx_code outer)
       return COSTS_N_INSNS (1);
 
     case MULT:
+      if (arm_arch6m && arm_m_profile_small_mul)
+       return COSTS_N_INSNS (32);
+
       if (CONST_INT_P (XEXP (x, 1)))
        {
          int cycles = 0;
index 2d5f91aa81e31f724943164717bbf30c5a43cf6d..0d5f12853d96b0952d19f8ed9ca7381390e01daf 100644 (file)
@@ -1,3 +1,17 @@
+2017-04-04  Thomas Preud'homme  <thomas.preudhomme@arm.com>
+
+       PR target/80307
+       * gcc.target/arm/small-multiply-m0-1.c: Do not skip test if not
+       targeting any CPU or architecture.
+       * gcc.target/arm/small-multiply-m0-2.c: Likewise.
+       * gcc.target/arm/small-multiply-m0-3.c: Likewise.
+       * gcc.target/arm/small-multiply-m0plus-1.c: Likewise.
+       * gcc.target/arm/small-multiply-m0plus-2.c: Likewise.
+       * gcc.target/arm/small-multiply-m0plus-3.c: Likewise.
+       * gcc.target/arm/small-multiply-m1-1.c: Likewise.
+       * gcc.target/arm/small-multiply-m1-2.c: Likewise.
+       * gcc.target/arm/small-multiply-m1-3.c: Likewise.
+
 2017-04-04  Nicolas Koenig  <koenigni@student.ethz.ch> 
 
        PR fortran/69498
index 49132e3e83d42874385523a3d0f05522a5974113..52c652c1cba3729c121d613bdb8c9f3524b04c98 100644 (file)
@@ -1,6 +1,6 @@
 /* { dg-do compile } */
 /* { dg-require-effective-target arm_thumb1_ok } */
-/* { dg-skip-if "Test is specific to cortex-m0.small-multiply" { arm*-*-* } { "*" } { "-mcpu=cortex-m0.small-multiply" } } */
+/* { dg-skip-if "do not override -mcpu" { *-*-* } { "-mcpu=*" "-march=*" } { "-mcpu=cortex-m0.small-multiply" } } */
 /* { dg-options "-mcpu=cortex-m0.small-multiply -mthumb -O2" } */
 
 int
index 7f1bf7bd604fcd6ef63f8dcb1fda0645d4803e87..10d49e9eace6141a5d3c906e235b6bbddaed8b4e 100644 (file)
@@ -1,6 +1,6 @@
 /* { dg-do compile } */
 /* { dg-require-effective-target arm_thumb1_ok } */
-/* { dg-skip-if "Test is specific to cortex-m0.small-multiply" { arm*-*-* } { "*" } { "-mcpu=cortex-m0.small-multiply" } } */
+/* { dg-skip-if "do not override -mcpu" { *-*-* } { "-mcpu=*" "-march=*" } { "-mcpu=cortex-m0.small-multiply" } } */
 /* { dg-options "-mcpu=cortex-m0.small-multiply -mthumb -Os" } */
 
 int
index aca39d746dc83ec94dce4d690bf1b87370192e94..b4af511af86c88a6d98a2779b3dc808d2163380c 100644 (file)
@@ -1,6 +1,6 @@
 /* { dg-do compile } */
 /* { dg-require-effective-target arm_thumb1_ok } */
-/* { dg-skip-if "Test is specific to cortex-m0.small-multiply" { arm*-*-* } { "*" } { "-mcpu=cortex-m0.small-multiply" } } */
+/* { dg-skip-if "do not override -mcpu" { *-*-* } { "-mcpu=*" "-march=*" } { "-mcpu=cortex-m0.small-multiply" } } */
 /* { dg-options "-mcpu=cortex-m0.small-multiply -mthumb -Os" } */
 
 int
index 12e8839753c3cd01e466cf61860236ff425c4e90..59dba7cf4abc814f0ee2cf9c4776d76d644a07fc 100644 (file)
@@ -1,6 +1,6 @@
 /* { dg-do compile } */
 /* { dg-require-effective-target arm_thumb1_ok } */
-/* { dg-skip-if "Test is specific to cortex-m0plus.small-multiply" { arm*-*-* } { "*" } { "-mcpu=cortex-m0plus.small-multiply" } } */
+/* { dg-skip-if "do not override -mcpu" { *-*-* } { "-mcpu=*" "-march=*" } { "-mcpu=cortex-m0plus.small-multiply" } } */
 /* { dg-options "-mcpu=cortex-m0plus.small-multiply -mthumb -O2" } */
 
 int
index 3e3c9b26e3c78379c439547e304cd9073fdfd36c..685ef44077669e6bc7152dd64b94d99056b93dd2 100644 (file)
@@ -1,6 +1,6 @@
 /* { dg-do compile } */
 /* { dg-require-effective-target arm_thumb1_ok } */
-/* { dg-skip-if "Test is specific to cortex-m0plus.small-multiply" { arm*-*-* } { "*" } { "-mcpu=cortex-m0plus.small-multiply" } } */
+/* { dg-skip-if "do not override -mcpu" { *-*-* } { "-mcpu=*" "-march=*" } { "-mcpu=cortex-m0plus.small-multiply" } } */
 /* { dg-options "-mcpu=cortex-m0plus.small-multiply -mthumb -Os" } */
 
 int
index 75e34321ec221550769bf3289bb0873bd9c44295..d24e720fe677fde0adf6865b24b3daf7bb2d286c 100644 (file)
@@ -1,6 +1,6 @@
 /* { dg-do compile } */
 /* { dg-require-effective-target arm_thumb1_ok } */
-/* { dg-skip-if "Test is specific to cortex-m0plus.small-multiply" { arm*-*-* } { "*" } { "-mcpu=cortex-m0plus.small-multiply" } } */
+/* { dg-skip-if "do not override -mcpu" { *-*-* } { "-mcpu=*" "-march=*" } { "-mcpu=cortex-m0plus.small-multiply" } } */
 /* { dg-options "-mcpu=cortex-m0plus.small-multiply -mthumb -Os" } */
 
 int
index fbe90cc4a541e4477e1279be0e7e0785788381cf..d966ae955ce8d8d02b438441a4d53262f7479d5f 100644 (file)
@@ -1,6 +1,6 @@
 /* { dg-do compile } */
 /* { dg-require-effective-target arm_thumb1_ok } */
-/* { dg-skip-if "Test is specific to cortex-m1.small-multiply" { arm*-*-* } { "*" } { "-mcpu=cortex-m1.small-multiply" } } */
+/* { dg-skip-if "do not override -mcpu" { *-*-* } { "-mcpu=*" "-march=*" } { "-mcpu=cortex-m1.small-multiply" } } */
 /* { dg-options "-mcpu=cortex-m1.small-multiply -mthumb -O2" } */
 
 int
index 6fca40564ee219b43aa5948dba1a749290a4dec2..60576bb9ed155d99851d6a00cd57eb3b78ea1a13 100644 (file)
@@ -1,6 +1,6 @@
 /* { dg-do compile } */
 /* { dg-require-effective-target arm_thumb1_ok } */
-/* { dg-skip-if "Test is specific to cortex-m1.small-multiply" { arm*-*-* } { "*" } { "-mcpu=cortex-m1.small-multiply" } } */
+/* { dg-skip-if "do not override -mcpu" { *-*-* } { "-mcpu=*" "-march=*" } { "-mcpu=cortex-m1.small-multiply" } } */
 /* { dg-options "-mcpu=cortex-m1.small-multiply -mthumb -Os" } */
 
 int
index bc732c32346b1650220c59caa920ce34bd2d3518..c56479d18973373fd8cc100d4614c083fd1a8cce 100644 (file)
@@ -1,6 +1,6 @@
 /* { dg-do compile } */
 /* { dg-require-effective-target arm_thumb1_ok } */
-/* { dg-skip-if "Test is specific to cortex-m1.small-multiply" { arm*-*-* } { "*" } { "-mcpu=cortex-m1.small-multiply" } } */
+/* { dg-skip-if "do not override -mcpu" { *-*-* } { "-mcpu=*" "-march=*" } { "-mcpu=cortex-m1.small-multiply" } } */
 /* { dg-options "-mcpu=cortex-m1.small-multiply -mthumb -Os" } */
 
 int