From: "Kewen.Lin" <linkw@linux.ibm.com>
To: Uros Bizjak <ubizjak@gmail.com>
Cc: Richard Biener <richard.guenther@gmail.com>,
Richard Sandiford <richard.sandiford@arm.com>,
Bill Schmidt <wschmidt@linux.ibm.com>,
GCC Patches <gcc-patches@gcc.gnu.org>,
Segher Boessenkool <segher@kernel.crashing.org>
Subject: Re: [PATCH v3] vect: Recog mul_highpart pattern
Date: Thu, 15 Jul 2021 16:49:15 +0800 [thread overview]
Message-ID: <6a13bfea-8482-ff6c-c3bf-e0110fc4b298@linux.ibm.com> (raw)
In-Reply-To: <CAFULd4ab33fNTvmv_eO7kCqbmcuO3+aFcV-Qj61H=oJkpgrvqQ@mail.gmail.com>
on 2021/7/15 下午4:23, Uros Bizjak wrote:
> On Thu, Jul 15, 2021 at 10:04 AM Kewen.Lin <linkw@linux.ibm.com> wrote:
>>
>> Hi Uros,
>>
>> on 2021/7/15 下午3:17, Uros Bizjak wrote:
>>> On Thu, Jul 15, 2021 at 9:07 AM Kewen.Lin <linkw@linux.ibm.com> wrote:
>>>>
>>>> on 2021/7/14 下午3:45, Kewen.Lin via Gcc-patches wrote:
>>>>> on 2021/7/14 下午2:38, Richard Biener wrote:
>>>>>> On Tue, Jul 13, 2021 at 4:59 PM Kewen.Lin <linkw@linux.ibm.com> wrote:
>>>>>>>
>>>>>>> on 2021/7/13 下午8:42, Richard Biener wrote:
>>>>>>>> On Tue, Jul 13, 2021 at 12:25 PM Kewen.Lin <linkw@linux.ibm.com> wrote:
>>>>>>
>>>>>>> I guess the proposed IFN would be directly mapped for [us]mul_highpart?
>>>>>>
>>>>>> Yes.
>>>>>>
>>>>>
>>>>> Thanks for confirming! The related patch v2 is attached and the testing
>>>>> is ongoing.
>>>>>
>>>>
>>>> It's bootstrapped & regtested on powerpc64le-linux-gnu P9 and
>>>> aarch64-linux-gnu. But on x86_64-redhat-linux there are XPASSes as below:
>>>>
>>>> XFAIL->XPASS: gcc.target/i386/pr100637-3w.c scan-assembler pmulhuw
>>>> XFAIL->XPASS: gcc.target/i386/pr100637-3w.c scan-assembler pmulhuw
>>>> XFAIL->XPASS: gcc.target/i386/pr100637-3w.c scan-assembler pmulhw
>>>> XFAIL->XPASS: gcc.target/i386/pr100637-3w.c scan-assembler pmulhw
>>>
>>> These XFAILs should be removed after your patch.
>>>
>> I'm curious whether it's intentional not to specify -fno-vect-cost-model
>> for this test case. As noted above, this case is sensitive on how we
>> cost mult_highpart. Without cost modeling, the XFAILs can be removed
>> only with this mul_highpart pattern support, no matter how we model it
>> (x86 part of this patch exists or not).
>>
>>> This is PR100696 [1], we want PMULH.W here, so x86 part of the patch
>>> is actually not needed.
>>>
>>
>> Thanks for the information! The justification for the x86 part is that:
>> the IFN_MULH essentially covers MULT_HIGHPART_EXPR with mul_highpart
>> optab support, i386 port has already customized costing for
>> MULT_HIGHPART_EXPR (should mean/involve the case with mul_highpart optab
>> support), if we don't follow the same way for IFN_MULH, I'm worried that
>> we may cost the IFN_MULH wrongly. If taking IFN_MULH as normal stmt is
>> a right thing (we shouldn't cost it specially), it at least means we
>> have to adjust ix86_multiplication_cost for MULT_HIGHPART_EXPR when it
>> has direct mul_highpart optab support, I think they should be costed
>> consistently. Does it sound reasonable?
>
> Ah, I was under impression that i386 part was introduced to avoid
> generation of PMULHW instructions in the testcases above (to keep
> XFAILs). Based on your explanation - yes, the costing function should
> be the same. So, the x86 part is OK.
>
Thanks! It does have the effect to keep XFAILs. ;) I guess the case
doesn't care about the costing much just like most vectorization cases?
If so, do you want me to remove the xfails with one extra option
"-fno-vect-cost-model" along with this patch?
BR,
Kewen
next prev parent reply other threads:[~2021-07-15 8:49 UTC|newest]
Thread overview: 31+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-07-13 8:52 [RFC/PATCH] " 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
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 [this message]
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=6a13bfea-8482-ff6c-c3bf-e0110fc4b298@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=ubizjak@gmail.com \
--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).