From: "Kewen.Lin" <linkw@linux.ibm.com>
To: richard.sandiford@arm.com
Cc: Richard Biener <richard.guenther@gmail.com>,
GCC Patches <gcc-patches@gcc.gnu.org>,
Segher Boessenkool <segher@kernel.crashing.org>,
Bill Schmidt <wschmidt@linux.ibm.com>
Subject: Re: [RFC/PATCH] vect: Recog mul_highpart pattern
Date: Thu, 15 Jul 2021 09:37:47 +0800 [thread overview]
Message-ID: <0d104ee3-5839-66f7-f429-6855e108191f@linux.ibm.com> (raw)
In-Reply-To: <mptr1g1b06v.fsf@arm.com>
on 2021/7/14 下午7:32, Richard Sandiford wrote:
> "Kewen.Lin" <linkw@linux.ibm.com> writes:
>> Hi Richard,
>>
>> on 2021/7/14 下午4:38, Richard Sandiford wrote:
>>> "Kewen.Lin" <linkw@linux.ibm.com> writes:
>>>> gcc/ChangeLog:
>>>>
>>>> * internal-fn.c (first_commutative_argument): Add info for IFN_MULH.
>>>> * internal-fn.def (IFN_MULH): New internal function.
>>>> * tree-vect-patterns.c (vect_recog_mulhs_pattern): Add support to
>>>> recog normal multiply highpart as IFN_MULH.
>>>
>>> LGTM FWIW, although:
>>>
>>
>> Thanks for the review!
>>
>>>> @@ -2030,8 +2048,7 @@ vect_recog_mulhs_pattern (vec_info *vinfo,
>>>> /* Check for target support. */
>>>> tree new_vectype = get_vectype_for_scalar_type (vinfo, new_type);
>>>> if (!new_vectype
>>>> - || !direct_internal_fn_supported_p
>>>> - (ifn, new_vectype, OPTIMIZE_FOR_SPEED))
>>>> + || !direct_internal_fn_supported_p (ifn, new_vectype, OPTIMIZE_FOR_SPEED))
>>>> return NULL;
>>>>
>>>> /* The IR requires a valid vector type for the cast result, even though
>>>> @@ -2043,8 +2060,8 @@ vect_recog_mulhs_pattern (vec_info *vinfo,
>>>> /* Generate the IFN_MULHRS call. */
>>>> tree new_var = vect_recog_temp_ssa_var (new_type, NULL);
>>>> tree new_ops[2];
>>>> - vect_convert_inputs (vinfo, last_stmt_info, 2, new_ops, new_type,
>>>> - unprom_mult, new_vectype);
>>>> + vect_convert_inputs (vinfo, last_stmt_info, 2, new_ops, new_type, unprom_mult,
>>>> + new_vectype);
>>>> gcall *mulhrs_stmt
>>>> = gimple_build_call_internal (ifn, 2, new_ops[0], new_ops[1]);
>>>> gimple_call_set_lhs (mulhrs_stmt, new_var);
>>>
>>> …these changes look like formatting only. (I guess it's down to whether
>>> or not the 80th column should be kept free for an “end of line+1” cursor.)
>>>
>>
>> Yeah, just for formatting, the formatting tool (clang-format) reformatted
>> them. Thanks for the information on "end of line+1" cursor, I didn't know
>> that before. I guess you prefer me to keep the original format? If so I
>> will remove them when committing it. I was thinking whether I should change
>> field ColumnLimit of my .clang-format to 79 to avoid this kind of case to
>> be caught by formatting tool again. Hope reviewers won't nit-pick the exact
>> 80 column cases then. :)
>
> TBH, 79 vs. 80 isn't normally something I'd worry about when reviewing
> new code. But I know in the past people have asked for 79 to be used
> for the “end+1” reason, so I don't think we should “fix” existing code
> that honours the 79 limit so that it no longer does, especially when the
> lines surrounding the code aren't changing.
>
Thanks for the explanation! Agree.
> There's also a risk of yo-yo-ing if someone else is using clang-format
> and does have the limit set to 79 columns.
>
> So yeah, I think it'd better to commit without the two hunks above.
>
Will fix them. Thanks for catching and explanations!
BR,
Kewen
next prev parent reply other threads:[~2021-07-15 1:37 UTC|newest]
Thread overview: 31+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-07-13 8:52 Kewen.Lin
2021-07-13 8:58 ` [PATCH] rs6000: Support [u]mul<mode>3_highpart for vector Kewen.Lin
2021-07-13 22:07 ` Segher Boessenkool
2021-07-14 2:12 ` Kewen.Lin
2021-07-14 18:38 ` Segher Boessenkool
2021-07-13 9:35 ` [RFC/PATCH] vect: Recog mul_highpart pattern Richard Biener
2021-07-13 9:40 ` Richard Sandiford
2021-07-13 9:44 ` Richard Biener
2021-07-13 10:11 ` Richard Sandiford
2021-07-13 10:25 ` Kewen.Lin
2021-07-13 12:42 ` Richard Biener
2021-07-13 14:59 ` Kewen.Lin
2021-07-14 6:38 ` Richard Biener
2021-07-14 7:45 ` Kewen.Lin
2021-07-14 8:38 ` Richard Sandiford
2021-07-14 10:02 ` Kewen.Lin
2021-07-14 11:32 ` Richard Sandiford
2021-07-14 19:32 ` Segher Boessenkool
2021-07-15 1:40 ` Kewen.Lin
2021-07-15 23:08 ` Segher Boessenkool
2021-07-15 1:37 ` Kewen.Lin [this message]
2021-07-15 7:06 ` [PATCH v3] " Kewen.Lin
2021-07-15 7:17 ` Uros Bizjak
2021-07-15 8:04 ` Kewen.Lin
2021-07-15 8:23 ` Uros Bizjak
2021-07-15 8:49 ` Kewen.Lin
2021-07-15 9:41 ` Uros Bizjak
2021-07-15 8:40 ` Kewen.Lin
2021-07-15 11:58 ` Richard Biener
2021-07-16 5:33 ` [PATCH v4] " Kewen.Lin
2021-07-19 10:35 ` Richard Biener
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=0d104ee3-5839-66f7-f429-6855e108191f@linux.ibm.com \
--to=linkw@linux.ibm.com \
--cc=gcc-patches@gcc.gnu.org \
--cc=richard.guenther@gmail.com \
--cc=richard.sandiford@arm.com \
--cc=segher@kernel.crashing.org \
--cc=wschmidt@linux.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).