[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 c207588..4136a29 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 bc1e607..931c72d 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 2d5f91a..0d5f128 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 49132e3..52c652c 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 7f1bf7b..10d49e9 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 aca39d7..b4af511 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 12e8839..59dba7c 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 3e3c9b2..685ef44 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 75e3432..d24e720 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 fbe90cc..d966ae9 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 6fca405..60576bb 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 bc732c3..c56479d 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