[committed] testsuite: fix IL32 issues with usdot tests.

Message ID patch-14663-tamar@arm.com
State New
Headers show
Series
  • [committed] testsuite: fix IL32 issues with usdot tests.
Related show

Commit Message

David Malcolm via Gcc-patches July 16, 2021, 2:54 p.m.
Hi All,

Fix tests when int == long by using long long instead.

Regtested on aarch64-none-linux-gnu and no issues.

Committed under the obvious rule.

Thanks,
Tamar

gcc/testsuite/ChangeLog:

	PR middle-end/101457
	* gcc.dg/vect/vect-reduc-dot-19.c: Use long long.
	* gcc.dg/vect/vect-reduc-dot-20.c: Likewise.
	* gcc.dg/vect/vect-reduc-dot-21.c: Likewise.
	* gcc.dg/vect/vect-reduc-dot-22.c: Likewise.

--- inline copy of patch -- 
diff --git a/gcc/testsuite/gcc.dg/vect/vect-reduc-dot-19.c b/gcc/testsuite/gcc.dg/vect/vect-reduc-dot-19.c
index dbeaaec24a1095b7730d9e1262f5a951fd2312fc..d00f24aae4c7ffbf213dc248faeeae96cd401411 100644


--

Patch

diff --git a/gcc/testsuite/gcc.dg/vect/vect-reduc-dot-19.c b/gcc/testsuite/gcc.dg/vect/vect-reduc-dot-19.c
index dbeaaec24a1095b7730d9e1262f5a951fd2312fc..d00f24aae4c7ffbf213dc248faeeae96cd401411 100644
--- a/gcc/testsuite/gcc.dg/vect/vect-reduc-dot-19.c
+++ b/gcc/testsuite/gcc.dg/vect/vect-reduc-dot-19.c
@@ -13,15 +13,15 @@ 
 #define SIGNEDNESS_4 unsigned
 #endif
 
-SIGNEDNESS_1 long __attribute__ ((noipa))
-f (SIGNEDNESS_1 long res, SIGNEDNESS_3 char *restrict a,
+SIGNEDNESS_1 long long __attribute__ ((noipa))
+f (SIGNEDNESS_1 long long res, SIGNEDNESS_3 char *restrict a,
    SIGNEDNESS_4 short *restrict b)
 {
   for (__INTPTR_TYPE__ i = 0; i < N; ++i)
     {
       int av = a[i];
       int bv = b[i];
-      SIGNEDNESS_2 long mult = av * bv;
+      SIGNEDNESS_2 long long mult = av * bv;
       res += mult;
     }
   return res;
@@ -37,7 +37,7 @@  main (void)
 
   SIGNEDNESS_3 char a[N];
   SIGNEDNESS_4 short b[N];
-  int expected = 0x12345;
+  SIGNEDNESS_1 long long expected = 0x12345;
   for (int i = 0; i < N; ++i)
     {
       a[i] = BASE + i * 5;
diff --git a/gcc/testsuite/gcc.dg/vect/vect-reduc-dot-20.c b/gcc/testsuite/gcc.dg/vect/vect-reduc-dot-20.c
index d757fb15615ba79dedcbfc44407d3f363274ad26..17adbca83a0c97e76db8e15c0ff376608fd5d1bd 100644
--- a/gcc/testsuite/gcc.dg/vect/vect-reduc-dot-20.c
+++ b/gcc/testsuite/gcc.dg/vect/vect-reduc-dot-20.c
@@ -13,15 +13,15 @@ 
 #define SIGNEDNESS_4 unsigned
 #endif
 
-SIGNEDNESS_1 long __attribute__ ((noipa))
-f (SIGNEDNESS_1 long res, SIGNEDNESS_3 short *restrict a,
+SIGNEDNESS_1 long long __attribute__ ((noipa))
+f (SIGNEDNESS_1 long long res, SIGNEDNESS_3 short *restrict a,
    SIGNEDNESS_4 char *restrict b)
 {
   for (__INTPTR_TYPE__ i = 0; i < N; ++i)
     {
       int av = a[i];
       int bv = b[i];
-      SIGNEDNESS_2 long mult = av * bv;
+      SIGNEDNESS_2 long long mult = av * bv;
       res += mult;
     }
   return res;
@@ -37,7 +37,7 @@  main (void)
 
   SIGNEDNESS_3 short a[N];
   SIGNEDNESS_4 char b[N];
-  int expected = 0x12345;
+  SIGNEDNESS_1 long long expected = 0x12345;
   for (int i = 0; i < N; ++i)
     {
       a[i] = BASE + i * 5;
diff --git a/gcc/testsuite/gcc.dg/vect/vect-reduc-dot-21.c b/gcc/testsuite/gcc.dg/vect/vect-reduc-dot-21.c
index 6d08bf4478be83de86b0975524687a75d025123e..6cc6a4f2e92ed21fe2e71c0cd842c80d44b6db9f 100644
--- a/gcc/testsuite/gcc.dg/vect/vect-reduc-dot-21.c
+++ b/gcc/testsuite/gcc.dg/vect/vect-reduc-dot-21.c
@@ -13,8 +13,8 @@ 
 #define SIGNEDNESS_4 unsigned
 #endif
 
-SIGNEDNESS_1 long __attribute__ ((noipa))
-f (SIGNEDNESS_1 long res, SIGNEDNESS_3 char *restrict a,
+SIGNEDNESS_1 long long __attribute__ ((noipa))
+f (SIGNEDNESS_1 long long res, SIGNEDNESS_3 char *restrict a,
    SIGNEDNESS_4 short *restrict b)
 {
   for (__INTPTR_TYPE__ i = 0; i < N; ++i)
@@ -37,7 +37,7 @@  main (void)
 
   SIGNEDNESS_3 char a[N];
   SIGNEDNESS_4 short b[N];
-  int expected = 0x12345;
+  SIGNEDNESS_1 long long expected = 0x12345;
   for (int i = 0; i < N; ++i)
     {
       a[i] = BASE + i * 5;
diff --git a/gcc/testsuite/gcc.dg/vect/vect-reduc-dot-22.c b/gcc/testsuite/gcc.dg/vect/vect-reduc-dot-22.c
index 0bde43a6cb855ce5edd9015ebf34ca226353d77e..e13d3d5c4da7b14df48fa9a2c7ad457c5ccbc89c 100644
--- a/gcc/testsuite/gcc.dg/vect/vect-reduc-dot-22.c
+++ b/gcc/testsuite/gcc.dg/vect/vect-reduc-dot-22.c
@@ -13,8 +13,8 @@ 
 #define SIGNEDNESS_4 unsigned
 #endif
 
-SIGNEDNESS_1 long __attribute__ ((noipa))
-f (SIGNEDNESS_1 long res, SIGNEDNESS_3 char *restrict a,
+SIGNEDNESS_1 long long __attribute__ ((noipa))
+f (SIGNEDNESS_1 long long res, SIGNEDNESS_3 char *restrict a,
    SIGNEDNESS_4 short *restrict b)
 {
   for (__INTPTR_TYPE__ i = 0; i < N; ++i)
@@ -37,7 +37,7 @@  main (void)
 
   SIGNEDNESS_3 char a[N];
   SIGNEDNESS_4 short b[N];
-  SIGNEDNESS_1 long expected = 0x12345;
+  SIGNEDNESS_1 long long expected = 0x12345;
   for (int i = 0; i < N; ++i)
     {
       a[i] = BASE + i * 5;