[Testsuite,MIPS] Fixing fix-r4000-n.c failure started with r255348

Message ID CAKjxQHk+kqrXbK4p090PJ2d7AvWnAnNcucAizmcps_x+aRThjQ@mail.gmail.com
State New
Headers show
Series
  • [Testsuite,MIPS] Fixing fix-r4000-n.c failure started with r255348
Related show

Commit Message

Paul Hua March 24, 2018, 2:47 a.m.
Hi:

The fix-r4000-n.c test fails after r255348, cause the r255348 does not print
 "[length = NN]" but "[c=NN l=NN]".

The asm for fix-r4000-1.c.
before r255348:
...
         mult    $4,$5    # 10   mulsi3_r4000    [length = 8]
         mflo    $2
...
after r255348:
...
         mult    $4,$5    # 10   [c=40 l=8]  mulsi3_r4000
         mflo    $2
...

So changes those tests for match new print styles.

The changes in patch for fix-r4000-1.c
 -/* { dg-final { scan-assembler-times "[concat
{\tmult\t\$[45],\$[45][^\n]+mulsi3_r4000[^\n]+\n\tmflo\t\$2\n}]" 2 } }
*/
+/* { dg-final { scan-assembler-times "[concat
{\tmult\t\$[45],\$[45][^\n]+mulsi3_r4000\n\tmflo\t\$2\n}]" 2 } } */


And also changes dg-final scan-assembler "mulditi3_r4000" instead of
"mulditi3" in fix-r4000-7.c.
changes dg-final scan-assembler "umulditi3_r4000" instead of
"umulditi3" in fix-r4000-8.c.

Thanks.
Paul Hua.

ChangeLog entries:

gcc/testsuite/ChangeLog

2018-03-24  Chenghua Xu <paul.hua.gm@gmail.com>

    * gcc.target/mips/fix-r4000-1.c: Delete "[^\n]" in dg-final.
    * gcc.target/mips/fix-r4000-2.c: Likewise.
    * gcc.target/mips/fix-r4000-3.c: Likewise.
    * gcc.target/mips/fix-r4000-4.c: Likewise.
    * gcc.target/mips/fix-r4000-5.c: Likewise.
    * gcc.target/mips/fix-r4000-6.c: Likewise.
    * gcc.target/mips/fix-r4000-7.c: Likewise.
    * gcc.target/mips/fix-r4000-8.c: Likewise.
    * gcc.target/mips/fix-r4000-9.c: Likewise.
    * gcc.target/mips/fix-r4000-10.c: Likewise.
    * gcc.target/mips/fix-r4000-7.c: Change dg-final
      "mulditi3_r4000" instead of "mulditi3".
    * gcc.target/mips/fix-r4000-8.c: Change dg-final
      "umulditi3_r4000" instead of "umulditi3".

Comments

Matthew Fortune March 27, 2018, 10:04 a.m. | #1
Hi Paul,

> ChangeLog entries:

> 

> gcc/testsuite/ChangeLog

> 

> 2018-03-24  Chenghua Xu <paul.hua.gm@gmail.com>

> 

>     * gcc.target/mips/fix-r4000-1.c: Delete "[^\n]" in dg-final.

>     * gcc.target/mips/fix-r4000-2.c: Likewise.

>     * gcc.target/mips/fix-r4000-3.c: Likewise.

>     * gcc.target/mips/fix-r4000-4.c: Likewise.

>     * gcc.target/mips/fix-r4000-5.c: Likewise.

>     * gcc.target/mips/fix-r4000-6.c: Likewise.

>     * gcc.target/mips/fix-r4000-7.c: Likewise.

>     * gcc.target/mips/fix-r4000-8.c: Likewise.

>     * gcc.target/mips/fix-r4000-9.c: Likewise.

>     * gcc.target/mips/fix-r4000-10.c: Likewise.

>     * gcc.target/mips/fix-r4000-7.c: Change dg-final

>       "mulditi3_r4000" instead of "mulditi3".

>     * gcc.target/mips/fix-r4000-8.c: Change dg-final

>       "umulditi3_r4000" instead of "umulditi3".


This looks good too. Another good cleanup, OK to commit.

Thanks,
Matthew

Patch

diff --git a/gcc/testsuite/gcc.target/mips/fix-r4000-1.c b/gcc/testsuite/gcc.target/mips/fix-r4000-1.c
index 5c812f25600..36062b0f6da 100644
--- a/gcc/testsuite/gcc.target/mips/fix-r4000-1.c
+++ b/gcc/testsuite/gcc.target/mips/fix-r4000-1.c
@@ -4,4 +4,4 @@  typedef int int32_t;
 typedef int uint32_t;
 NOMIPS16 int32_t foo (int32_t x, int32_t y) { return x * y; }
 NOMIPS16 uint32_t bar (uint32_t x, uint32_t y) { return x * y; }
-/* { dg-final { scan-assembler-times "[concat {\tmult\t\$[45],\$[45][^\n]+mulsi3_r4000[^\n]+\n\tmflo\t\$2\n}]" 2 } } */
+/* { dg-final { scan-assembler-times "[concat {\tmult\t\$[45],\$[45][^\n]+mulsi3_r4000\n\tmflo\t\$2\n}]" 2 } } */
diff --git a/gcc/testsuite/gcc.target/mips/fix-r4000-10.c b/gcc/testsuite/gcc.target/mips/fix-r4000-10.c
index 7227bc8c092..7345eb511be 100644
--- a/gcc/testsuite/gcc.target/mips/fix-r4000-10.c
+++ b/gcc/testsuite/gcc.target/mips/fix-r4000-10.c
@@ -6,4 +6,4 @@ 
 typedef unsigned long long uint64_t;
 typedef unsigned int uint128_t __attribute__((mode(TI)));
 NOMIPS16 uint128_t foo (uint64_t x, uint64_t y) { return (uint128_t) x * y; }
-/* { dg-final { scan-assembler "[concat {\tdmultu\t\$[45],\$[45][^\n]+umulditi3_r4000[^\n]+\n\tmflo\t\$2\n\tmfhi\t\$3\n}]" } } */
+/* { dg-final { scan-assembler "[concat {\tdmultu\t\$[45],\$[45][^\n]+umulditi3_r4000\n\tmflo\t\$2\n\tmfhi\t\$3\n}]" } } */
diff --git a/gcc/testsuite/gcc.target/mips/fix-r4000-2.c b/gcc/testsuite/gcc.target/mips/fix-r4000-2.c
index 0261b16b1c8..4290d5f7fab 100644
--- a/gcc/testsuite/gcc.target/mips/fix-r4000-2.c
+++ b/gcc/testsuite/gcc.target/mips/fix-r4000-2.c
@@ -6,4 +6,4 @@  typedef long long int64_t;
 NOMIPS16 int32_t foo (int32_t x, int32_t y) { return ((int64_t) x * y) >> 32; }
 /* ??? A highpart pattern would be a better choice, but we currently
    don't use them.  */
-/* { dg-final { scan-assembler "[concat {\tmult\t\$[45],\$[45][^\n]+mulsidi3_32bit_r4000[^\n]+\n\tmflo\t\$3\n\tmfhi\t\$2\n}]" } } */
+/* { dg-final { scan-assembler "[concat {\tmult\t\$[45],\$[45][^\n]+mulsidi3_32bit_r4000\n\tmflo\t\$3\n\tmfhi\t\$2\n}]" } } */
diff --git a/gcc/testsuite/gcc.target/mips/fix-r4000-3.c b/gcc/testsuite/gcc.target/mips/fix-r4000-3.c
index 195a9d10ced..5bc8fc8ddd4 100644
--- a/gcc/testsuite/gcc.target/mips/fix-r4000-3.c
+++ b/gcc/testsuite/gcc.target/mips/fix-r4000-3.c
@@ -5,4 +5,4 @@  typedef unsigned long long uint64_t;
 NOMIPS16 uint32_t foo (uint32_t x, uint32_t y) { return ((uint64_t) x * y) >> 32; }
 /* ??? A highpart pattern would be a better choice, but we currently
    don't use them.  */
-/* { dg-final { scan-assembler "[concat {\tmultu\t\$[45],\$[45][^\n]+umulsidi3_32bit_r4000[^\n]+\n\tmflo\t\$3\n\tmfhi\t\$2\n}]" } } */
+/* { dg-final { scan-assembler "[concat {\tmultu\t\$[45],\$[45][^\n]+umulsidi3_32bit_r4000\n\tmflo\t\$3\n\tmfhi\t\$2\n}]" } } */
diff --git a/gcc/testsuite/gcc.target/mips/fix-r4000-4.c b/gcc/testsuite/gcc.target/mips/fix-r4000-4.c
index 7a66182f524..4b655b5edf6 100644
--- a/gcc/testsuite/gcc.target/mips/fix-r4000-4.c
+++ b/gcc/testsuite/gcc.target/mips/fix-r4000-4.c
@@ -7,4 +7,4 @@ 
 typedef int int32_t;
 typedef long long int64_t;
 NOMIPS16 int64_t foo (int32_t x, int32_t y) { return (int64_t) x * y; }
-/* { dg-final { scan-assembler "[concat {\tmult\t\$[45],\$[45][^\n]+mulsidi3_32bit_r4000[^\n]+\n\tmflo\t\$2\n\tmfhi\t\$3\n}]" } } */
+/* { dg-final { scan-assembler "[concat {\tmult\t\$[45],\$[45][^\n]+mulsidi3_32bit_r4000\n\tmflo\t\$2\n\tmfhi\t\$3\n}]" } } */
diff --git a/gcc/testsuite/gcc.target/mips/fix-r4000-5.c b/gcc/testsuite/gcc.target/mips/fix-r4000-5.c
index 0c063080068..7536399e5c1 100644
--- a/gcc/testsuite/gcc.target/mips/fix-r4000-5.c
+++ b/gcc/testsuite/gcc.target/mips/fix-r4000-5.c
@@ -6,4 +6,4 @@ 
 typedef unsigned int uint32_t;
 typedef unsigned long long uint64_t;
 NOMIPS16 uint64_t foo (uint32_t x, uint32_t y) { return (uint64_t) x * y; }
-/* { dg-final { scan-assembler "[concat {\tmultu\t\$[45],\$[45][^\n]+umulsidi3_32bit_r4000[^\n]+\n\tmflo\t\$2\n\tmfhi\t\$3\n}]" } } */
+/* { dg-final { scan-assembler "[concat {\tmultu\t\$[45],\$[45][^\n]+umulsidi3_32bit_r4000\n\tmflo\t\$2\n\tmfhi\t\$3\n}]" } } */
diff --git a/gcc/testsuite/gcc.target/mips/fix-r4000-6.c b/gcc/testsuite/gcc.target/mips/fix-r4000-6.c
index 9647a900cdd..cee756b2701 100644
--- a/gcc/testsuite/gcc.target/mips/fix-r4000-6.c
+++ b/gcc/testsuite/gcc.target/mips/fix-r4000-6.c
@@ -4,4 +4,4 @@  typedef long long int64_t;
 typedef unsigned long long uint64_t;
 NOMIPS16 int64_t foo (int64_t x, int64_t y) { return x * y; }
 NOMIPS16 uint64_t bar (uint64_t x, uint64_t y) { return x * y; }
-/* { dg-final { scan-assembler-times "[concat {\tdmult\t\$[45],\$[45][^\n]+muldi3_r4000[^\n]+\n\tmflo\t\$2\n}]" 2 } } */
+/* { dg-final { scan-assembler-times "[concat {\tdmult\t\$[45],\$[45][^\n]+muldi3_r4000\n\tmflo\t\$2\n}]" 2 } } */
diff --git a/gcc/testsuite/gcc.target/mips/fix-r4000-7.c b/gcc/testsuite/gcc.target/mips/fix-r4000-7.c
index ddba3038350..25178db9070 100644
--- a/gcc/testsuite/gcc.target/mips/fix-r4000-7.c
+++ b/gcc/testsuite/gcc.target/mips/fix-r4000-7.c
@@ -6,4 +6,4 @@  typedef int int128_t __attribute__((mode(TI)));
 NOMIPS16 int64_t foo (int64_t x, int64_t y) { return ((int128_t) x * y) >> 64; }
 /* ??? A highpart pattern would be a better choice, but we currently
    don't use them.  */
-/* { dg-final { scan-assembler "[concat {\tdmult\t\$[45],\$[45][^\n]+mulditi3[^\n]+\n\tmflo\t\$3\n\tmfhi\t\$2\n}]" } } */
+/* { dg-final { scan-assembler "[concat {\tdmult\t\$[45],\$[45][^\n]+mulditi3_r4000\n\tmflo\t\$3\n\tmfhi\t\$2\n}]" } } */
diff --git a/gcc/testsuite/gcc.target/mips/fix-r4000-8.c b/gcc/testsuite/gcc.target/mips/fix-r4000-8.c
index 4ae670622ba..eae148817ce 100644
--- a/gcc/testsuite/gcc.target/mips/fix-r4000-8.c
+++ b/gcc/testsuite/gcc.target/mips/fix-r4000-8.c
@@ -5,4 +5,4 @@  typedef unsigned int uint128_t __attribute__((mode(TI)));
 NOMIPS16 uint64_t foo (uint64_t x, uint64_t y) { return ((uint128_t) x * y) >> 64; }
 /* ??? A highpart pattern would be a better choice, but we currently
    don't use them.  */
-/* { dg-final { scan-assembler "[concat {\tdmultu\t\$[45],\$[45][^\n]+umulditi3[^\n]+\n\tmflo\t\$3\n\tmfhi\t\$2\n}]" } } */
+/* { dg-final { scan-assembler "[concat {\tdmultu\t\$[45],\$[45][^\n]+umulditi3_r4000\n\tmflo\t\$3\n\tmfhi\t\$2\n}]" } } */
diff --git a/gcc/testsuite/gcc.target/mips/fix-r4000-9.c b/gcc/testsuite/gcc.target/mips/fix-r4000-9.c
index 316715c5934..63610f97812 100644
--- a/gcc/testsuite/gcc.target/mips/fix-r4000-9.c
+++ b/gcc/testsuite/gcc.target/mips/fix-r4000-9.c
@@ -7,4 +7,4 @@ 
 typedef long long int64_t;
 typedef int int128_t __attribute__((mode(TI)));
 NOMIPS16 int128_t foo (int64_t x, int64_t y) { return (int128_t) x * y; }
-/* { dg-final { scan-assembler "[concat {\tdmult\t\$[45],\$[45][^\n]+mulditi3_r4000[^\n]+\n\tmflo\t\$2\n\tmfhi\t\$3\n}]" } } */
+/* { dg-final { scan-assembler "[concat {\tdmult\t\$[45],\$[45][^\n]+mulditi3_r4000\n\tmflo\t\$2\n\tmfhi\t\$3\n}]" } } */