testsuite: fix IL32 issues with usdot tests.
authorTamar Christina <tamar.christina@arm.com>
Fri, 16 Jul 2021 14:56:35 +0000 (15:56 +0100)
committerTamar Christina <tamar.christina@arm.com>
Fri, 16 Jul 2021 14:56:35 +0000 (15:56 +0100)
Fix tests when int == long by using long long instead.

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.

gcc/testsuite/gcc.dg/vect/vect-reduc-dot-19.c
gcc/testsuite/gcc.dg/vect/vect-reduc-dot-20.c
gcc/testsuite/gcc.dg/vect/vect-reduc-dot-21.c
gcc/testsuite/gcc.dg/vect/vect-reduc-dot-22.c

index dbeaaec..d00f24a 100644 (file)
 #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;
index d757fb1..17adbca 100644 (file)
 #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;
index 6d08bf4..6cc6a4f 100644 (file)
@@ -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;
index 0bde43a..e13d3d5 100644 (file)
@@ -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;