From 3bf6e1f89dbd2c67c419d3d4e94085208611262f Mon Sep 17 00:00:00 2001 From: Tamar Christina Date: Fri, 16 Jul 2021 15:56:35 +0100 Subject: [PATCH] testsuite: fix IL32 issues with usdot tests. 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 | 8 ++++---- gcc/testsuite/gcc.dg/vect/vect-reduc-dot-20.c | 8 ++++---- gcc/testsuite/gcc.dg/vect/vect-reduc-dot-21.c | 6 +++--- gcc/testsuite/gcc.dg/vect/vect-reduc-dot-22.c | 6 +++--- 4 files changed, 14 insertions(+), 14 deletions(-) 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 dbeaaec..d00f24a 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 d757fb1..17adbca8 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 6d08bf4..6cc6a4f 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 0bde43a..e13d3d5 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; -- 2.7.4