public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* [PATCH, rs6000] fix execution failure of parity_1.f90 on P10 [PR100952]
@ 2021-07-06  3:01 HAO CHEN GUI
  2021-07-13  1:38 ` HAO CHEN GUI
  0 siblings, 1 reply; 4+ messages in thread
From: HAO CHEN GUI @ 2021-07-06  3:01 UTC (permalink / raw)
  To: gcc-patches; +Cc: Segher Boessenkool, Bill Schmidt

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

Hi,

    The patch fixed the wrong "if" fall through in "cstore<mode>4" 
expand, which causes comparison pattern expanded twice on P10.

    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: ChangeLog1 --]
[-- Type: text/plain, Size: 86 bytes --]

	PR target/100952
	* config/rs6000/rs6000.md (cstore<mode>4): Fix wrong fall through.

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

diff --git a/gcc/config/rs6000/rs6000.md b/gcc/config/rs6000/rs6000.md
index 3f59b544f6a..3ae7aa29c1d 100644
--- a/gcc/config/rs6000/rs6000.md
+++ b/gcc/config/rs6000/rs6000.md
@@ -11627,7 +11627,7 @@ (define_expand "cstore<mode>4"
 
   /* Expanding EQ and NE directly to some machine instructions does not help
      but does hurt combine.  So don't.  */
-  if (GET_CODE (operands[1]) == EQ)
+  else if (GET_CODE (operands[1]) == EQ)
     emit_insn (gen_eq<mode>3 (operands[0], operands[2], operands[3]));
   else if (<MODE>mode == Pmode
 	   && GET_CODE (operands[1]) == NE)

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

* Re: [PATCH, rs6000] fix execution failure of parity_1.f90 on P10 [PR100952]
  2021-07-06  3:01 [PATCH, rs6000] fix execution failure of parity_1.f90 on P10 [PR100952] HAO CHEN GUI
@ 2021-07-13  1:38 ` HAO CHEN GUI
  2021-07-19  2:39   ` Ping " HAO CHEN GUI
  2021-07-21 22:19   ` Segher Boessenkool
  0 siblings, 2 replies; 4+ messages in thread
From: HAO CHEN GUI @ 2021-07-13  1:38 UTC (permalink / raw)
  To: gcc-patches; +Cc: Segher Boessenkool, Bill Schmidt

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

Hi,

    I refined the patch according to Segher's advice. Is this okay for 
trunk? Any recommendations? Thanks a lot.

On 6/7/2021 上午 11:01, HAO CHEN GUI wrote:
> Hi,
>
>    The patch fixed the wrong "if" fall through in "cstore<mode>4" 
> expand, which causes comparison pattern expanded twice on P10.
>
>    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: ChangeLog1 --]
[-- Type: text/plain, Size: 86 bytes --]

	PR target/100952
	* config/rs6000/rs6000.md (cstore<mode>4): Fix wrong fall through.

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

diff --git a/gcc/config/rs6000/rs6000.md b/gcc/config/rs6000/rs6000.md
index 3f59b544f6a..d7c13d4e79d 100644
--- a/gcc/config/rs6000/rs6000.md
+++ b/gcc/config/rs6000/rs6000.md
@@ -11623,7 +11623,10 @@ (define_expand "cstore<mode>4"
 {
   /* Everything is best done with setbc[r] if available.  */
   if (TARGET_POWER10 && TARGET_ISEL)
-    rs6000_emit_int_cmove (operands[0], operands[1], const1_rtx, const0_rtx);
+    {
+      rs6000_emit_int_cmove (operands[0], operands[1], const1_rtx, const0_rtx);
+      DONE;
+    }
 
   /* Expanding EQ and NE directly to some machine instructions does not help
      but does hurt combine.  So don't.  */

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

* Ping [PATCH, rs6000] fix execution failure of parity_1.f90 on P10 [PR100952]
  2021-07-13  1:38 ` HAO CHEN GUI
@ 2021-07-19  2:39   ` HAO CHEN GUI
  2021-07-21 22:19   ` Segher Boessenkool
  1 sibling, 0 replies; 4+ messages in thread
From: HAO CHEN GUI @ 2021-07-19  2:39 UTC (permalink / raw)
  To: gcc-patches; +Cc: Segher Boessenkool, Bill Schmidt

Hi,

      Gentle ping this:

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

Thanks

On 13/7/2021 上午 9:38, HAO CHEN GUI wrote:
> Hi,
>
>    I refined the patch according to Segher's advice. Is this okay for 
> trunk? Any recommendations? Thanks a lot.
>
> On 6/7/2021 上午 11:01, HAO CHEN GUI wrote:
>> Hi,
>>
>>    The patch fixed the wrong "if" fall through in "cstore<mode>4" 
>> expand, which causes comparison pattern expanded twice on P10.
>>
>>    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 execution failure of parity_1.f90 on P10 [PR100952]
  2021-07-13  1:38 ` HAO CHEN GUI
  2021-07-19  2:39   ` Ping " HAO CHEN GUI
@ 2021-07-21 22:19   ` Segher Boessenkool
  1 sibling, 0 replies; 4+ messages in thread
From: Segher Boessenkool @ 2021-07-21 22:19 UTC (permalink / raw)
  To: HAO CHEN GUI; +Cc: gcc-patches, Bill Schmidt

Sorry for the delay!

On Tue, Jul 13, 2021 at 09:38:33AM +0800, HAO CHEN GUI wrote:
> 	PR target/100952
> 	* config/rs6000/rs6000.md (cstore<mode>4): Fix wrong fall through.

> diff --git a/gcc/config/rs6000/rs6000.md b/gcc/config/rs6000/rs6000.md
> index 3f59b544f6a..d7c13d4e79d 100644
> --- a/gcc/config/rs6000/rs6000.md
> +++ b/gcc/config/rs6000/rs6000.md
> @@ -11623,7 +11623,10 @@ (define_expand "cstore<mode>4"
>  {
>    /* Everything is best done with setbc[r] if available.  */
>    if (TARGET_POWER10 && TARGET_ISEL)
> -    rs6000_emit_int_cmove (operands[0], operands[1], const1_rtx, const0_rtx);
> +    {
> +      rs6000_emit_int_cmove (operands[0], operands[1], const1_rtx, const0_rtx);
> +      DONE;
> +    }
>  
>    /* Expanding EQ and NE directly to some machine instructions does not help
>       but does hurt combine.  So don't.  */

Perfect.  Okay for trunk and backports (but do not touch GCC 11 right
now without RM approval, see
<https://gcc.gnu.org/pipermail/gcc/2021-July/236837.html>).  Thanks!


Segher

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

end of thread, other threads:[~2021-07-21 22:20 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:01 [PATCH, rs6000] fix execution failure of parity_1.f90 on P10 [PR100952] HAO CHEN GUI
2021-07-13  1:38 ` HAO CHEN GUI
2021-07-19  2:39   ` Ping " HAO CHEN GUI
2021-07-21 22:19   ` Segher Boessenkool

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