public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* [PATCH] testsuite: Adjust pr113359-2_*.c with unsigned long long [PR114662]
@ 2024-04-10  6:24 Kewen.Lin
  2024-04-10  7:11 ` Richard Biener
  0 siblings, 1 reply; 3+ messages in thread
From: Kewen.Lin @ 2024-04-10  6:24 UTC (permalink / raw)
  To: GCC Patches; +Cc: Richard Biener, Martin Jambor, Peter Bergner

Hi,

pr113359-2_*.c define a struct having unsigned long type
members ay and az which have 4 bytes size at -m32, while
the related constants CL1 and CL2 used for equality check
are always 8 bytes, it makes compiler consider the below

  69   if (a.ay != CL1)
  70     __builtin_abort ();

always to abort and optimize away the following call to
getb, which leads to the expected wpa dumping on
"Semantic equality" missing.

This patch is to modify the types with unsigned long long
accordingly.  Tested well on powerpc64-linux-gnu.

Is it ok for trunk?

BR,
Kewen
-----
	PR testsuite/114662

gcc/testsuite/ChangeLog:

	* gcc.dg/lto/pr113359-2_0.c: Use unsigned long long instead of
	unsigned long.
	* gcc.dg/lto/pr113359-2_1.c: Likewise.
---
 gcc/testsuite/gcc.dg/lto/pr113359-2_0.c | 8 ++++----
 gcc/testsuite/gcc.dg/lto/pr113359-2_1.c | 8 ++++----
 2 files changed, 8 insertions(+), 8 deletions(-)

diff --git a/gcc/testsuite/gcc.dg/lto/pr113359-2_0.c b/gcc/testsuite/gcc.dg/lto/pr113359-2_0.c
index 8b2d5bdfab2..8495667599d 100644
--- a/gcc/testsuite/gcc.dg/lto/pr113359-2_0.c
+++ b/gcc/testsuite/gcc.dg/lto/pr113359-2_0.c
@@ -8,15 +8,15 @@
 struct SA
 {
   unsigned int ax;
-  unsigned long ay;
-  unsigned long az;
+  unsigned long long ay;
+  unsigned long long az;
 };

 struct SB
 {
   unsigned int bx;
-  unsigned long by;
-  unsigned long bz;
+  unsigned long long by;
+  unsigned long long bz;
 };

 struct ZA
diff --git a/gcc/testsuite/gcc.dg/lto/pr113359-2_1.c b/gcc/testsuite/gcc.dg/lto/pr113359-2_1.c
index 61bc0547981..8320f347efe 100644
--- a/gcc/testsuite/gcc.dg/lto/pr113359-2_1.c
+++ b/gcc/testsuite/gcc.dg/lto/pr113359-2_1.c
@@ -5,15 +5,15 @@
 struct SA
 {
   unsigned int ax;
-  unsigned long ay;
-  unsigned long az;
+  unsigned long long ay;
+  unsigned long long az;
 };

 struct SB
 {
   unsigned int bx;
-  unsigned long by;
-  unsigned long bz;
+  unsigned long long by;
+  unsigned long long bz;
 };

 struct ZA
--
2.43.0

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] testsuite: Adjust pr113359-2_*.c with unsigned long long [PR114662]
  2024-04-10  6:24 [PATCH] testsuite: Adjust pr113359-2_*.c with unsigned long long [PR114662] Kewen.Lin
@ 2024-04-10  7:11 ` Richard Biener
  2024-04-10  8:04   ` Kewen.Lin
  0 siblings, 1 reply; 3+ messages in thread
From: Richard Biener @ 2024-04-10  7:11 UTC (permalink / raw)
  To: Kewen.Lin; +Cc: GCC Patches, Martin Jambor, Peter Bergner

On Wed, Apr 10, 2024 at 8:24 AM Kewen.Lin <linkw@linux.ibm.com> wrote:
>
> Hi,
>
> pr113359-2_*.c define a struct having unsigned long type
> members ay and az which have 4 bytes size at -m32, while
> the related constants CL1 and CL2 used for equality check
> are always 8 bytes, it makes compiler consider the below
>
>   69   if (a.ay != CL1)
>   70     __builtin_abort ();
>
> always to abort and optimize away the following call to
> getb, which leads to the expected wpa dumping on
> "Semantic equality" missing.
>
> This patch is to modify the types with unsigned long long
> accordingly.  Tested well on powerpc64-linux-gnu.
>
> Is it ok for trunk?

OK

> BR,
> Kewen
> -----
>         PR testsuite/114662
>
> gcc/testsuite/ChangeLog:
>
>         * gcc.dg/lto/pr113359-2_0.c: Use unsigned long long instead of
>         unsigned long.
>         * gcc.dg/lto/pr113359-2_1.c: Likewise.
> ---
>  gcc/testsuite/gcc.dg/lto/pr113359-2_0.c | 8 ++++----
>  gcc/testsuite/gcc.dg/lto/pr113359-2_1.c | 8 ++++----
>  2 files changed, 8 insertions(+), 8 deletions(-)
>
> diff --git a/gcc/testsuite/gcc.dg/lto/pr113359-2_0.c b/gcc/testsuite/gcc.dg/lto/pr113359-2_0.c
> index 8b2d5bdfab2..8495667599d 100644
> --- a/gcc/testsuite/gcc.dg/lto/pr113359-2_0.c
> +++ b/gcc/testsuite/gcc.dg/lto/pr113359-2_0.c
> @@ -8,15 +8,15 @@
>  struct SA
>  {
>    unsigned int ax;
> -  unsigned long ay;
> -  unsigned long az;
> +  unsigned long long ay;
> +  unsigned long long az;
>  };
>
>  struct SB
>  {
>    unsigned int bx;
> -  unsigned long by;
> -  unsigned long bz;
> +  unsigned long long by;
> +  unsigned long long bz;
>  };
>
>  struct ZA
> diff --git a/gcc/testsuite/gcc.dg/lto/pr113359-2_1.c b/gcc/testsuite/gcc.dg/lto/pr113359-2_1.c
> index 61bc0547981..8320f347efe 100644
> --- a/gcc/testsuite/gcc.dg/lto/pr113359-2_1.c
> +++ b/gcc/testsuite/gcc.dg/lto/pr113359-2_1.c
> @@ -5,15 +5,15 @@
>  struct SA
>  {
>    unsigned int ax;
> -  unsigned long ay;
> -  unsigned long az;
> +  unsigned long long ay;
> +  unsigned long long az;
>  };
>
>  struct SB
>  {
>    unsigned int bx;
> -  unsigned long by;
> -  unsigned long bz;
> +  unsigned long long by;
> +  unsigned long long bz;
>  };
>
>  struct ZA
> --
> 2.43.0

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] testsuite: Adjust pr113359-2_*.c with unsigned long long [PR114662]
  2024-04-10  7:11 ` Richard Biener
@ 2024-04-10  8:04   ` Kewen.Lin
  0 siblings, 0 replies; 3+ messages in thread
From: Kewen.Lin @ 2024-04-10  8:04 UTC (permalink / raw)
  To: Richard Biener; +Cc: GCC Patches, Martin Jambor, Peter Bergner

on 2024/4/10 15:11, Richard Biener wrote:
> On Wed, Apr 10, 2024 at 8:24 AM Kewen.Lin <linkw@linux.ibm.com> wrote:
>>
>> Hi,
>>
>> pr113359-2_*.c define a struct having unsigned long type
>> members ay and az which have 4 bytes size at -m32, while
>> the related constants CL1 and CL2 used for equality check
>> are always 8 bytes, it makes compiler consider the below
>>
>>   69   if (a.ay != CL1)
>>   70     __builtin_abort ();
>>
>> always to abort and optimize away the following call to
>> getb, which leads to the expected wpa dumping on
>> "Semantic equality" missing.
>>
>> This patch is to modify the types with unsigned long long
>> accordingly.  Tested well on powerpc64-linux-gnu.
>>
>> Is it ok for trunk?
> 
> OK

Thanks!  Pushed as r14-9886.

BR,
Kewen

> 
>> BR,
>> Kewen
>> -----
>>         PR testsuite/114662
>>
>> gcc/testsuite/ChangeLog:
>>
>>         * gcc.dg/lto/pr113359-2_0.c: Use unsigned long long instead of
>>         unsigned long.
>>         * gcc.dg/lto/pr113359-2_1.c: Likewise.
>> ---
>>  gcc/testsuite/gcc.dg/lto/pr113359-2_0.c | 8 ++++----
>>  gcc/testsuite/gcc.dg/lto/pr113359-2_1.c | 8 ++++----
>>  2 files changed, 8 insertions(+), 8 deletions(-)
>>
>> diff --git a/gcc/testsuite/gcc.dg/lto/pr113359-2_0.c b/gcc/testsuite/gcc.dg/lto/pr113359-2_0.c
>> index 8b2d5bdfab2..8495667599d 100644
>> --- a/gcc/testsuite/gcc.dg/lto/pr113359-2_0.c
>> +++ b/gcc/testsuite/gcc.dg/lto/pr113359-2_0.c
>> @@ -8,15 +8,15 @@
>>  struct SA
>>  {
>>    unsigned int ax;
>> -  unsigned long ay;
>> -  unsigned long az;
>> +  unsigned long long ay;
>> +  unsigned long long az;
>>  };
>>
>>  struct SB
>>  {
>>    unsigned int bx;
>> -  unsigned long by;
>> -  unsigned long bz;
>> +  unsigned long long by;
>> +  unsigned long long bz;
>>  };
>>
>>  struct ZA
>> diff --git a/gcc/testsuite/gcc.dg/lto/pr113359-2_1.c b/gcc/testsuite/gcc.dg/lto/pr113359-2_1.c
>> index 61bc0547981..8320f347efe 100644
>> --- a/gcc/testsuite/gcc.dg/lto/pr113359-2_1.c
>> +++ b/gcc/testsuite/gcc.dg/lto/pr113359-2_1.c
>> @@ -5,15 +5,15 @@
>>  struct SA
>>  {
>>    unsigned int ax;
>> -  unsigned long ay;
>> -  unsigned long az;
>> +  unsigned long long ay;
>> +  unsigned long long az;
>>  };
>>
>>  struct SB
>>  {
>>    unsigned int bx;
>> -  unsigned long by;
>> -  unsigned long bz;
>> +  unsigned long long by;
>> +  unsigned long long bz;
>>  };
>>
>>  struct ZA
>> --
>> 2.43.0


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2024-04-10  8:04 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-04-10  6:24 [PATCH] testsuite: Adjust pr113359-2_*.c with unsigned long long [PR114662] Kewen.Lin
2024-04-10  7:11 ` Richard Biener
2024-04-10  8:04   ` Kewen.Lin

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).