public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: "Kewen.Lin" <linkw@linux.ibm.com>
To: Segher Boessenkool <segher@kernel.crashing.org>
Cc: Peter Bergner <bergner@linux.ibm.com>,
	GCC Patches <gcc-patches@gcc.gnu.org>,
	David Edelsohn <dje.gcc@gmail.com>,
	will schmidt <will_schmidt@vnet.ibm.com>
Subject: Re: [PATCH v3] rs6000: Adjust mov optabs for opaque modes [PR103353]
Date: Tue, 16 Aug 2022 13:53:33 +0800	[thread overview]
Message-ID: <0054a837-ec76-a626-4566-932cb4fbffec@linux.ibm.com> (raw)
In-Reply-To: <20220815213006.GK25951@gate.crashing.org>

Hi Segher,

Thanks for the review!

on 2022/8/16 05:30, Segher Boessenkool wrote:
> Hi!
> 
> On Mon, Jun 27, 2022 at 10:47:26AM +0800, Kewen.Lin wrote:
>> on 2022/6/25 00:49, Segher Boessenkool wrote:
>> Many thanks for all the further explanation above!  The attached patch
>> updated the misleading comments as you pointed out and suggested, could
>> you help to have another look?
> 
> Please do not send proposed patches in the middle of a mail thread.  It
> is harder to track things than needed this way, and it makes it hard to
> apply your patches as well (for test builds, say).
> 

Got it!

>> Subject: [PATCH] rs6000: Adjust mov optabs for opaque modes [PR103353]
>>
>> As PR103353 shows, we may want to continue to expand built-in
>> function __builtin_vsx_lxvp, even if we have already emitted
>> error messages about some missing required conditions.  As
>> shown in that PR, without one explicit mov optab on OOmode
>> provided, it would call emit_move_insn recursively.
> 
>> -  rs6000_emit_move (operands[0], operands[1], OOmode);
>> -  DONE;
>> +  if (TARGET_MMA) {
>> +    rs6000_emit_move (operands[0], operands[1], OOmode);
>> +    DONE;
>> +  }
> 
>   if (TARGET_MMA)
>     {
>       rs6000_emit_move (operands[0], operands[1], OOmode);
>       DONE;
>     }
> 

Good catch, done!

>> +  /* PR103353 shows we may want to continue to expand the __builtin_vsx_lxvp
>> +     built-in function, even if we have already emitted error messages about
>> +     some missing required conditions.  As shown in that PR, without one
>> +     explicit mov optab on OOmode provided, it would call emit_move_insn
>> +     recursively.  So we allow this pattern to be generated when we are
>> +     expanding to RTL and have seen errors.  It would not cause further ICEs
>> +     as the compilation would stop soon after expanding.  */
>> +  else if (currently_expanding_to_rtl && seen_error ())
>> +    ;
> 
> The comment goes inside this "else if" branch.  Maybe make it a braced
> block if the semicolon looks out of place without it.
> 

Done.

> Removing the TARGET_MMA requirement is the correct thing to do no matter
> what: this is not an MMA insn at all after all, and neither is it only
> useful if MMA is enabled, etc.

Yeah, it needs one subsequent patch as we agree on.

> 
> Is the later "unreachable" ever useful?  If not, you could just fall
> through after that "if (TARGET_MMA)" thing.  Worst that will happen you
> get an OO move in the insn stream that we will error on later :-)

Yeah, I agree that "just FAIL" works for this issue, but for now without
the valid condition in the context we only expect this expansion to just
perform for bif further expansion (knowing it's taken as bad), the
"unreachable" is meant to punt the other unexpected cases.  :)

> 
> The patch is okay for trunk with the indentation fixed.  Thanks!
> 

Indentation and comments problems addressed, committed in r13-2062.

Thanks again!

BR,
Kewen

      reply	other threads:[~2022-08-16  5:53 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-05-18 14:07 Kewen.Lin
2022-06-06  8:53 ` PING^1 " Kewen.Lin
2022-06-23  2:02   ` PING^2 " Kewen.Lin
2022-06-23 19:06 ` Segher Boessenkool
2022-06-24  1:03   ` Kewen.Lin
2022-06-24 16:49     ` Segher Boessenkool
2022-06-27  2:47       ` Kewen.Lin
2022-07-28  8:49         ` PING^1 [PATCH v4] " Kewen.Lin
2022-08-15  8:07           ` PING^2 " Kewen.Lin
2022-08-15 21:30         ` [PATCH v3] " Segher Boessenkool
2022-08-16  5:53           ` Kewen.Lin [this message]

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=0054a837-ec76-a626-4566-932cb4fbffec@linux.ibm.com \
    --to=linkw@linux.ibm.com \
    --cc=bergner@linux.ibm.com \
    --cc=dje.gcc@gmail.com \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=segher@kernel.crashing.org \
    --cc=will_schmidt@vnet.ibm.com \
    /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).