public inbox for gcc-cvs@sourceware.org
help / color / mirror / Atom feed
From: Andrew Pinski <pinskia@gcc.gnu.org>
To: gcc-cvs@gcc.gnu.org
Subject: [gcc r14-8417] Fix a few vect gimple testcases for LLP64 targets (e.g. mingw) [PR113548]
Date: Thu, 25 Jan 2024 08:31:08 +0000 (GMT)	[thread overview]
Message-ID: <20240125083109.00A2F3858D38@sourceware.org> (raw)

https://gcc.gnu.org/g:e7d7c9e889ae8553b9aac79e6944d70702f8ee53

commit r14-8417-ge7d7c9e889ae8553b9aac79e6944d70702f8ee53
Author: Andrew Pinski <quic_apinski@quicinc.com>
Date:   Wed Jan 24 10:28:37 2024 -0800

    Fix a few vect gimple testcases for LLP64 targets (e.g. mingw) [PR113548]
    
    This fixes of the vect testcases which uses the gimple FE for LLP64 targets.
    The testcases use directly `unsigned long` for the addition to pointers
    when they should be using `__SIZETYPE__`. This changes to use that instead.
    
    gcc/testsuite/ChangeLog:
    
            PR testsuite/113548
            * gcc.dg/vect/slp-reduc-10a.c: Use `__SIZETYPE__` instead of `unsigned long`.
            * gcc.dg/vect/slp-reduc-10b.c: Likewise.
            * gcc.dg/vect/slp-reduc-10c.c: Likewise.
            * gcc.dg/vect/slp-reduc-10d.c: Likewise.
            * gcc.dg/vect/slp-reduc-10e.c: Likewise.
            * gcc.dg/vect/vect-cond-arith-2.c: Likewise.
            * gcc.dg/vect/vect-ifcvt-19.c: Likewise.
    
    Signed-off-by: Andrew Pinski <quic_apinski@quicinc.com>

Diff:
---
 gcc/testsuite/gcc.dg/vect/slp-reduc-10a.c     | 20 ++++++++++----------
 gcc/testsuite/gcc.dg/vect/slp-reduc-10b.c     | 20 ++++++++++----------
 gcc/testsuite/gcc.dg/vect/slp-reduc-10c.c     |  6 +++---
 gcc/testsuite/gcc.dg/vect/slp-reduc-10d.c     |  6 +++---
 gcc/testsuite/gcc.dg/vect/slp-reduc-10e.c     |  6 +++---
 gcc/testsuite/gcc.dg/vect/vect-cond-arith-2.c |  8 ++++----
 gcc/testsuite/gcc.dg/vect/vect-ifcvt-19.c     |  8 ++++----
 7 files changed, 37 insertions(+), 37 deletions(-)

diff --git a/gcc/testsuite/gcc.dg/vect/slp-reduc-10a.c b/gcc/testsuite/gcc.dg/vect/slp-reduc-10a.c
index d3c2c2d7f54..66d3a6c4765 100644
--- a/gcc/testsuite/gcc.dg/vect/slp-reduc-10a.c
+++ b/gcc/testsuite/gcc.dg/vect/slp-reduc-10a.c
@@ -8,8 +8,8 @@ foo (int * x, int n)
   int i;
   int sum;
   int _1;
-  long unsigned int _2;
-  long unsigned int _3;
+  __SIZETYPE__ _2;
+  __SIZETYPE__ _3;
   int * _4;
   int _5;
   __SIZETYPE__ _7;
@@ -38,23 +38,23 @@ foo (int * x, int n)
   sum_30 = __PHI (__BB5: 0, __BB6: sum_27);
   i_32 = __PHI (__BB5: 0, __BB6: i_28);
   _1 = i_32 * 4;
-  _2 = (long unsigned int) _1;
-  _3 = _2 * 4ul;
+  _2 = (__SIZETYPE__) _1;
+  _3 = _2 * _Literal(__SIZETYPE__)4;
   _4 = x_23(D) + _3;
   _5 = __MEM <int> (_4);
   sum_24 = _5 + sum_30;
-  _7 = _2 + 1ul;
-  _8 = _7 * 4ul;
+  _7 = _2 + _Literal(__SIZETYPE__)1;
+  _8 = _7 * _Literal(__SIZETYPE__)4;
   _9 = x_23(D) + _8;
   _10 = __MEM <int> (_9);
   sum_25 = _10 + sum_24;
-  _11 = _2 + 2ul;
-  _12 = _11 * 4ul;
+  _11 = _2 + _Literal(__SIZETYPE__)2;
+  _12 = _11 * _Literal(__SIZETYPE__)4;
   _13 = x_23(D) + _12;
   _14 = __MEM <int> (_13);
   sum_26 = _14 + sum_25;
-  _15 = _2 + 3ul;
-  _16 = _15 * 4ul;
+  _15 = _2 + _Literal(__SIZETYPE__)3;
+  _16 = _15 * _Literal(__SIZETYPE__)4;
   _17 = x_23(D) + _16;
   _18 = __MEM <int> (_17);
   sum_27 = _18 + sum_26;
diff --git a/gcc/testsuite/gcc.dg/vect/slp-reduc-10b.c b/gcc/testsuite/gcc.dg/vect/slp-reduc-10b.c
index 6a0d55def30..2e6d15e1c9d 100644
--- a/gcc/testsuite/gcc.dg/vect/slp-reduc-10b.c
+++ b/gcc/testsuite/gcc.dg/vect/slp-reduc-10b.c
@@ -8,8 +8,8 @@ foo (int * x, int n)
   int i;
   int sum;
   int _1;
-  long unsigned int _2;
-  long unsigned int _3;
+  __SIZETYPE__ _2;
+  __SIZETYPE__ _3;
   int * _4;
   int _5;
   __SIZETYPE__ _7;
@@ -38,23 +38,23 @@ foo (int * x, int n)
   sum_30 = __PHI (__BB5: 0, __BB6: sum_27);
   i_32 = __PHI (__BB5: 0, __BB6: i_28);
   _1 = i_32 * 4;
-  _2 = (long unsigned int) _1;
-  _3 = _2 * 4ul;
+  _2 = (__SIZETYPE__) _1;
+  _3 = _2 * _Literal(__SIZETYPE__)4;
   _4 = x_23(D) + _3;
   _5 = __MEM <int> (_4);
   sum_24 = _5 + sum_30;
-  _7 = _2 + 1ul;
-  _8 = _7 * 4ul;
+  _7 = _2 + _Literal(__SIZETYPE__)1;
+  _8 = _7 * _Literal(__SIZETYPE__)4;
   _9 = x_23(D) + _8;
   _100 = __MEM <int> (_9);
   sum_25 = sum_24 + _100;
-  _11 = _2 + 2ul;
-  _12 = _11 * 4ul;
+  _11 = _2 + _Literal(__SIZETYPE__)2;
+  _12 = _11 * _Literal(__SIZETYPE__)4;
   _13 = x_23(D) + _12;
   _14 = __MEM <int> (_13);
   sum_26 = _14 + sum_25;
-  _15 = _2 + 3ul;
-  _16 = _15 * 4ul;
+  _15 = _2 + _Literal(__SIZETYPE__)3;
+  _16 = _15 * _Literal(__SIZETYPE__)4;
   _17 = x_23(D) + _16;
   _18 = __MEM <int> (_17);
   sum_27 = _18 + sum_26;
diff --git a/gcc/testsuite/gcc.dg/vect/slp-reduc-10c.c b/gcc/testsuite/gcc.dg/vect/slp-reduc-10c.c
index 20df2626764..25a21adb729 100644
--- a/gcc/testsuite/gcc.dg/vect/slp-reduc-10c.c
+++ b/gcc/testsuite/gcc.dg/vect/slp-reduc-10c.c
@@ -8,8 +8,8 @@ foo (int * x, int n)
   int i;
   int sum;
   int _1;
-  long unsigned int _2;
-  long unsigned int _3;
+  __SIZETYPE__ _2;
+  __SIZETYPE__ _3;
   int * _4;
   int _5;
   __SIZETYPE__ _7;
@@ -38,7 +38,7 @@ foo (int * x, int n)
   sum_30 = __PHI (__BB5: 0, __BB6: sum_27);
   i_32 = __PHI (__BB5: 0, __BB6: i_28);
   _1 = i_32 * 4;
-  _2 = (long unsigned int) _1;
+  _2 = (__SIZETYPE__) _1;
   _3 = _2 * 4ul;
   _4 = x_23(D) + _3;
   _5 = __MEM <int> (_4);
diff --git a/gcc/testsuite/gcc.dg/vect/slp-reduc-10d.c b/gcc/testsuite/gcc.dg/vect/slp-reduc-10d.c
index 8a512d5c14d..e96f9c42dcc 100644
--- a/gcc/testsuite/gcc.dg/vect/slp-reduc-10d.c
+++ b/gcc/testsuite/gcc.dg/vect/slp-reduc-10d.c
@@ -8,8 +8,8 @@ foo (int * x, int n)
   int i;
   int sum;
   int _1;
-  long unsigned int _2;
-  long unsigned int _3;
+  __SIZETYPE__ _2;
+  __SIZETYPE__ _3;
   int * _4;
   int _5;
   __SIZETYPE__ _7;
@@ -38,7 +38,7 @@ foo (int * x, int n)
   sum_30 = __PHI (__BB5: 0, __BB6: sum_27);
   i_32 = __PHI (__BB5: 0, __BB6: i_28);
   _1 = i_32 * 4;
-  _2 = (long unsigned int) _1;
+  _2 = (__SIZETYPE__) _1;
   _3 = _2 * 4ul;
   _4 = x_23(D) + _3;
   _5 = __MEM <int> (_4);
diff --git a/gcc/testsuite/gcc.dg/vect/slp-reduc-10e.c b/gcc/testsuite/gcc.dg/vect/slp-reduc-10e.c
index 268ec9db77d..3a2c583d671 100644
--- a/gcc/testsuite/gcc.dg/vect/slp-reduc-10e.c
+++ b/gcc/testsuite/gcc.dg/vect/slp-reduc-10e.c
@@ -8,8 +8,8 @@ foo (int * x, int n)
   int i;
   int sum;
   int _1;
-  long unsigned int _2;
-  long unsigned int _3;
+  __SIZETYPE__ _2;
+  __SIZETYPE__ _3;
   int * _4;
   int _100;
   __SIZETYPE__ _7;
@@ -38,7 +38,7 @@ foo (int * x, int n)
   sum_30 = __PHI (__BB5: 0, __BB6: sum_27);
   i_32 = __PHI (__BB5: 0, __BB6: i_28);
   _1 = i_32 * 4;
-  _2 = (long unsigned int) _1;
+  _2 = (__SIZETYPE__) _1;
   _3 = _2 * 4ul;
   _4 = x_23(D) + _3;
   _100 = __MEM <int> (_4);
diff --git a/gcc/testsuite/gcc.dg/vect/vect-cond-arith-2.c b/gcc/testsuite/gcc.dg/vect/vect-cond-arith-2.c
index 7b3d73acb88..a4fb043004c 100644
--- a/gcc/testsuite/gcc.dg/vect/vect-cond-arith-2.c
+++ b/gcc/testsuite/gcc.dg/vect/vect-cond-arith-2.c
@@ -6,8 +6,8 @@ double __GIMPLE (ssa, startwith("loop"))
 neg_xi (double *x)
 {
   int i;
-  long unsigned int index;
-  long unsigned int offset;
+  __SIZETYPE__ index;
+  __SIZETYPE__ offset;
   double * xi_ptr;
   double xi;
   double neg_xi;
@@ -21,8 +21,8 @@ neg_xi (double *x)
   res_1 = __PHI (__BB5: 0.0, __BB3: res_2);
   i_4 = __PHI (__BB5: 0, __BB3: i_5);
   ivtmp_6 = __PHI (__BB5: 100U, __BB3: ivtmp_7);
-  index = (long unsigned int) i_4;
-  offset = index * 8UL;
+  index = (__SIZE_TYPE__) i_4;
+  offset = index * _Literal(__SIZE_TYPE__) 8;
   xi_ptr = x_8(D) + offset;
   xi = *xi_ptr;
   neg_xi = -xi;
diff --git a/gcc/testsuite/gcc.dg/vect/vect-ifcvt-19.c b/gcc/testsuite/gcc.dg/vect/vect-ifcvt-19.c
index e34bfa907a7..b10147298d3 100644
--- a/gcc/testsuite/gcc.dg/vect/vect-ifcvt-19.c
+++ b/gcc/testsuite/gcc.dg/vect/vect-ifcvt-19.c
@@ -7,8 +7,8 @@ foo (int * f, int d, int e)
   int t;
   int a;
   int i;
-  long unsigned int _1;
-  long unsigned int _2;
+  __SIZETYPE__ _1;
+  __SIZETYPE__ _2;
   int * _3;
   int _4;
 
@@ -17,8 +17,8 @@ foo (int * f, int d, int e)
 
   __BB(3,loop_header(1),guessed_local(1063004408)):
   i_18 = __PHI (__BB8: i_15, __BB2: 0);
-  _1 = (long unsigned int) i_18;
-  _2 = _1 * 4ul;
+  _1 = (__SIZETYPE__) i_18;
+  _2 = _1 * _Literal(__SIZETYPE__) 4;
   _3 = f_9(D) + _2;
   a_10 = __MEM <int> (_3);
   if (a_10 < 0)

                 reply	other threads:[~2024-01-25  8:31 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20240125083109.00A2F3858D38@sourceware.org \
    --to=pinskia@gcc.gnu.org \
    --cc=gcc-cvs@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).