public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* [PATCH, rs6000] fix failure test cases caused by disabling mode promotion for pseudos [PR100952]
@ 2021-07-06  3:11 HAO CHEN GUI
  2021-07-19  2:41 ` Ping " HAO CHEN GUI
  2021-07-21 22:51 ` Segher Boessenkool
  0 siblings, 2 replies; 4+ messages in thread
From: HAO CHEN GUI @ 2021-07-06  3:11 UTC (permalink / raw)
  To: gcc-patches; +Cc: Segher Boessenkool, Bill Schmidt

[-- Attachment #1: Type: text/plain, Size: 346 bytes --]

Hi

    The patch changed matching conditions in pr81384.c and pr56605.c. 
The original conditions failed to match due to mode promotion disabled.

    The attachments are the patch diff and change log file.

    Bootstrapped and tested on powerpc64le-linux with no regressions. Is 
this okay for trunk? Any recommendations? Thanks a lot.


[-- Attachment #2: ChangeLog2 --]
[-- Type: text/plain, Size: 152 bytes --]

	PR target/100952
	* gcc/testsuite/gcc.target/powerpc/pr56605.c: Change matching
	conditions.
	* gcc/testsuite/gcc.target/powerpc/pr81348.c: Likewise.


[-- Attachment #3: patch2.diff --]
[-- Type: text/plain, Size: 1089 bytes --]

diff --git a/gcc/testsuite/gcc.target/powerpc/pr56605.c b/gcc/testsuite/gcc.target/powerpc/pr56605.c
index 29efd815adc..2b7ddbd7410 100644
--- a/gcc/testsuite/gcc.target/powerpc/pr56605.c
+++ b/gcc/testsuite/gcc.target/powerpc/pr56605.c
@@ -11,5 +11,5 @@ void foo (short* __restrict sb, int* __restrict ia)
     ia[i] = (int) sb[i];
 }
 
-/* { dg-final { scan-rtl-dump-times "\\\(compare:CC \\\((?:and|zero_extend):DI \\\(reg:\[SD\]I" 1 "combine" } } */
+/* { dg-final { scan-rtl-dump-times "\\\(compare:CC \\\((?:and|zero_extend):SI \\\(subreg:SI \\\(reg:\[SD\]I" 1 "combine" } } */
 
diff --git a/gcc/testsuite/gcc.target/powerpc/pr81348.c b/gcc/testsuite/gcc.target/powerpc/pr81348.c
index 7037acf0c22..8043d06bcde 100644
--- a/gcc/testsuite/gcc.target/powerpc/pr81348.c
+++ b/gcc/testsuite/gcc.target/powerpc/pr81348.c
@@ -19,5 +19,5 @@ void d(void)
         ***c = e;
 }
 
-/* { dg-final { scan-assembler {\mlxsihzx\M}  } } */
-/* { dg-final { scan-assembler {\mvextsh2d\M} } } */
+/* { dg-final { scan-assembler {\mlha\M}  } } */
+/* { dg-final { scan-assembler {\mmtvsrwa\M} } } */

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

* Ping [PATCH, rs6000] fix failure test cases caused by disabling mode promotion for pseudos [PR100952]
  2021-07-06  3:11 [PATCH, rs6000] fix failure test cases caused by disabling mode promotion for pseudos [PR100952] HAO CHEN GUI
@ 2021-07-19  2:41 ` HAO CHEN GUI
  2021-07-21 22:51 ` Segher Boessenkool
  1 sibling, 0 replies; 4+ messages in thread
From: HAO CHEN GUI @ 2021-07-19  2:41 UTC (permalink / raw)
  To: gcc-patches; +Cc: Segher Boessenkool, Bill Schmidt

Hi,

   Gentle ping this:

https://gcc.gnu.org/pipermail/gcc-patches/2021-July/574503.html

Thanks.

On 6/7/2021 上午 11:11, HAO CHEN GUI wrote:
>
> Hi
>
>    The patch changed matching conditions in pr81384.c and pr56605.c. 
> The original conditions failed to match due to mode promotion disabled.
>
>    The attachments are the patch diff and change log file.
>
>    Bootstrapped and tested on powerpc64le-linux with no regressions. 
> Is this okay for trunk? Any recommendations? Thanks a lot.
>

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

* Re: [PATCH, rs6000] fix failure test cases caused by disabling mode promotion for pseudos [PR100952]
  2021-07-06  3:11 [PATCH, rs6000] fix failure test cases caused by disabling mode promotion for pseudos [PR100952] HAO CHEN GUI
  2021-07-19  2:41 ` Ping " HAO CHEN GUI
@ 2021-07-21 22:51 ` Segher Boessenkool
  2021-07-23  0:46   ` HAO CHEN GUI
  1 sibling, 1 reply; 4+ messages in thread
From: Segher Boessenkool @ 2021-07-21 22:51 UTC (permalink / raw)
  To: HAO CHEN GUI; +Cc: gcc-patches, Bill Schmidt

Hi!

On Tue, Jul 06, 2021 at 11:11:05AM +0800, HAO CHEN GUI wrote:
>    The patch changed matching conditions in pr81384.c and pr56605.c. 
> The original conditions failed to match due to mode promotion disabled.

> 	PR target/100952
> 	* gcc/testsuite/gcc.target/powerpc/pr56605.c: Change matching
> 	conditions.
> 	* gcc/testsuite/gcc.target/powerpc/pr81348.c: Likewise.
> 

> diff --git a/gcc/testsuite/gcc.target/powerpc/pr56605.c b/gcc/testsuite/gcc.target/powerpc/pr56605.c
> index 29efd815adc..2b7ddbd7410 100644
> --- a/gcc/testsuite/gcc.target/powerpc/pr56605.c
> +++ b/gcc/testsuite/gcc.target/powerpc/pr56605.c
> @@ -11,5 +11,5 @@ void foo (short* __restrict sb, int* __restrict ia)
>      ia[i] = (int) sb[i];
>  }
>  
> -/* { dg-final { scan-rtl-dump-times "\\\(compare:CC \\\((?:and|zero_extend):DI \\\(reg:\[SD\]I" 1 "combine" } } */
> +/* { dg-final { scan-rtl-dump-times "\\\(compare:CC \\\((?:and|zero_extend):SI \\\(subreg:SI \\\(reg:\[SD\]I" 1 "combine" } } */

So, this testcase only runs on 64-bit machines (even only on lp64
configurations).  But do we now always get a subreg?  And, can that
change again some time in the future?

Writing it as
/* { dg-final { scan-rtl-dump-times {\(compare:CC \((?:and|zero_extend):SI \(subreg:SI \(reg:[SD]I} 1 "combine" } } */
is easier to read btw.

If you get a subreg:SI of a reg:SI here, something is wrong.  And you
cannot have a zero_extend:SI of anything :SI either.

So what the original matched were
  (compare:CC (and:DI (reg:DI
and
  (compare:CC (zero_extend:DI (reg:SI
and now you want to allow a subreg:SI in that last one as well (and you
do not really care what it is a subreg of, you don't check what offset
anyway), so maybe just
/* { dg-final { scan-rtl-dump-times {\(compare:CC \((?:and|zero_extend):(?:DI \((?:sub)?reg:[SD]I} 1 "combine" } } */
will do what you want?

> --- a/gcc/testsuite/gcc.target/powerpc/pr81348.c
> +++ b/gcc/testsuite/gcc.target/powerpc/pr81348.c
> @@ -19,5 +19,5 @@ void d(void)
>          ***c = e;
>  }
>  
> -/* { dg-final { scan-assembler {\mlxsihzx\M}  } } */
> -/* { dg-final { scan-assembler {\mvextsh2d\M} } } */
> +/* { dg-final { scan-assembler {\mlha\M}  } } */
> +/* { dg-final { scan-assembler {\mmtvsrwa\M} } } */

(This test should not test for powerpc64*-*-* but powerpc*-*-* btw,
and that means it can just be left out, so just
/* { dg-do compile { target lp64 } } */
and nothing more).

Okay for trunk with those changes (the RE and lp64).  Thanks!
(Test if it works of course; I did not :-) )


Segher

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

* Re: [PATCH, rs6000] fix failure test cases caused by disabling mode promotion for pseudos [PR100952]
  2021-07-21 22:51 ` Segher Boessenkool
@ 2021-07-23  0:46   ` HAO CHEN GUI
  0 siblings, 0 replies; 4+ messages in thread
From: HAO CHEN GUI @ 2021-07-23  0:46 UTC (permalink / raw)
  To: Segher Boessenkool; +Cc: gcc-patches, Bill Schmidt

Segher,

    Thanks for your advice. I tested it. "{ dg-final { 
scan-rtl-dump-times {\(compare:CC \((?:and|zero_extend):(?:DI) 
\((?:sub)?reg:[SD]I} 1 "combine" } }" works well.

On 22/7/2021 上午 6:51, Segher Boessenkool wrote:
> Hi!
>
> On Tue, Jul 06, 2021 at 11:11:05AM +0800, HAO CHEN GUI wrote:
>>     The patch changed matching conditions in pr81384.c and pr56605.c.
>> The original conditions failed to match due to mode promotion disabled.
>> 	PR target/100952
>> 	* gcc/testsuite/gcc.target/powerpc/pr56605.c: Change matching
>> 	conditions.
>> 	* gcc/testsuite/gcc.target/powerpc/pr81348.c: Likewise.
>>
>> diff --git a/gcc/testsuite/gcc.target/powerpc/pr56605.c b/gcc/testsuite/gcc.target/powerpc/pr56605.c
>> index 29efd815adc..2b7ddbd7410 100644
>> --- a/gcc/testsuite/gcc.target/powerpc/pr56605.c
>> +++ b/gcc/testsuite/gcc.target/powerpc/pr56605.c
>> @@ -11,5 +11,5 @@ void foo (short* __restrict sb, int* __restrict ia)
>>       ia[i] = (int) sb[i];
>>   }
>>   
>> -/* { dg-final { scan-rtl-dump-times "\\\(compare:CC \\\((?:and|zero_extend):DI \\\(reg:\[SD\]I" 1 "combine" } } */
>> +/* { dg-final { scan-rtl-dump-times "\\\(compare:CC \\\((?:and|zero_extend):SI \\\(subreg:SI \\\(reg:\[SD\]I" 1 "combine" } } */
> So, this testcase only runs on 64-bit machines (even only on lp64
> configurations).  But do we now always get a subreg?  And, can that
> change again some time in the future?
>
> Writing it as
> /* { dg-final { scan-rtl-dump-times {\(compare:CC \((?:and|zero_extend):SI \(subreg:SI \(reg:[SD]I} 1 "combine" } } */
> is easier to read btw.
>
> If you get a subreg:SI of a reg:SI here, something is wrong.  And you
> cannot have a zero_extend:SI of anything :SI either.
>
> So what the original matched were
>    (compare:CC (and:DI (reg:DI
> and
>    (compare:CC (zero_extend:DI (reg:SI
> and now you want to allow a subreg:SI in that last one as well (and you
> do not really care what it is a subreg of, you don't check what offset
> anyway), so maybe just
> /* { dg-final { scan-rtl-dump-times {\(compare:CC \((?:and|zero_extend):(?:DI \((?:sub)?reg:[SD]I} 1 "combine" } } */
> will do what you want?
>
>> --- a/gcc/testsuite/gcc.target/powerpc/pr81348.c
>> +++ b/gcc/testsuite/gcc.target/powerpc/pr81348.c
>> @@ -19,5 +19,5 @@ void d(void)
>>           ***c = e;
>>   }
>>   
>> -/* { dg-final { scan-assembler {\mlxsihzx\M}  } } */
>> -/* { dg-final { scan-assembler {\mvextsh2d\M} } } */
>> +/* { dg-final { scan-assembler {\mlha\M}  } } */
>> +/* { dg-final { scan-assembler {\mmtvsrwa\M} } } */
> (This test should not test for powerpc64*-*-* but powerpc*-*-* btw,
> and that means it can just be left out, so just
> /* { dg-do compile { target lp64 } } */
> and nothing more).
>
> Okay for trunk with those changes (the RE and lp64).  Thanks!
> (Test if it works of course; I did not :-) )
>
>
> Segher

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

end of thread, other threads:[~2021-07-23  0:46 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-07-06  3:11 [PATCH, rs6000] fix failure test cases caused by disabling mode promotion for pseudos [PR100952] HAO CHEN GUI
2021-07-19  2:41 ` Ping " HAO CHEN GUI
2021-07-21 22:51 ` Segher Boessenkool
2021-07-23  0:46   ` HAO CHEN GUI

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