public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* [PATCH] rs6000: Add missing unsigned info for some P10 bifs
@ 2021-08-11  5:44 Kewen.Lin
  2021-08-11 16:24 ` Bill Schmidt
  2021-08-30  2:24 ` Kewen.Lin
  0 siblings, 2 replies; 4+ messages in thread
From: Kewen.Lin @ 2021-08-11  5:44 UTC (permalink / raw)
  To: GCC Patches; +Cc: Segher Boessenkool, Bill Schmidt, David Edelsohn

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

Hi,

This patch is to make prototypes of some Power10 built-in
functions consistent with what's in the documentation, as
well as the vector version.  Otherwise, useless conversions
can be generated in gimple IR, and the vectorized versions
will have inconsistent types.

Bootstrapped & regtested on powerpc64le-linux-gnu P9 and
powerpc64-linux-gnu P8.

Is it ok for trunk?

BR,
Kewen
-----
gcc/ChangeLog:

	* config/rs6000/rs6000-call.c (builtin_function_type): Add unsigned
	signedness for some Power10 bifs.

[-- Attachment #2: signed.patch --]
[-- Type: text/plain, Size: 733 bytes --]

---
 gcc/config/rs6000/rs6000-call.c | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/gcc/config/rs6000/rs6000-call.c b/gcc/config/rs6000/rs6000-call.c
index 904e104c058..b92928c891a 100644
--- a/gcc/config/rs6000/rs6000-call.c
+++ b/gcc/config/rs6000/rs6000-call.c
@@ -14674,6 +14674,11 @@ builtin_function_type (machine_mode mode_ret, machine_mode mode_arg0,
     case P8V_BUILTIN_ORC_V4SI_UNS:
     case P8V_BUILTIN_ORC_V2DI_UNS:
     case P8V_BUILTIN_ORC_V1TI_UNS:
+    case P10_BUILTIN_CFUGED:
+    case P10_BUILTIN_CNTLZDM:
+    case P10_BUILTIN_CNTTZDM:
+    case P10_BUILTIN_PDEPD:
+    case P10_BUILTIN_PEXTD:
     case P10V_BUILTIN_VCFUGED:
     case P10V_BUILTIN_VCLZDM:
     case P10V_BUILTIN_VCTZDM:
-- 
2.17.1


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

* Re: [PATCH] rs6000: Add missing unsigned info for some P10 bifs
  2021-08-11  5:44 [PATCH] rs6000: Add missing unsigned info for some P10 bifs Kewen.Lin
@ 2021-08-11 16:24 ` Bill Schmidt
  2021-08-13  1:41   ` Kewen.Lin
  2021-08-30  2:24 ` Kewen.Lin
  1 sibling, 1 reply; 4+ messages in thread
From: Bill Schmidt @ 2021-08-11 16:24 UTC (permalink / raw)
  To: Kewen.Lin, GCC Patches; +Cc: Segher Boessenkool, David Edelsohn

Hi Kewen,

On 8/11/21 12:44 AM, Kewen.Lin wrote:
> Hi,
>
> This patch is to make prototypes of some Power10 built-in
> functions consistent with what's in the documentation, as
> well as the vector version.  Otherwise, useless conversions
> can be generated in gimple IR, and the vectorized versions
> will have inconsistent types.
>
> Bootstrapped & regtested on powerpc64le-linux-gnu P9 and
> powerpc64-linux-gnu P8.
>
> Is it ok for trunk?

LGTM.  Maintainers, this is necessary in the short term for the old 
builtins support, but this fragile thing that people always forget will 
go away with the new support.  What Kewen is proposing here is correct 
for now.

Thanks,
Bill

>
> BR,
> Kewen
> -----
> gcc/ChangeLog:
>
> 	* config/rs6000/rs6000-call.c (builtin_function_type): Add unsigned
> 	signedness for some Power10 bifs.

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

* Re: [PATCH] rs6000: Add missing unsigned info for some P10 bifs
  2021-08-11 16:24 ` Bill Schmidt
@ 2021-08-13  1:41   ` Kewen.Lin
  0 siblings, 0 replies; 4+ messages in thread
From: Kewen.Lin @ 2021-08-13  1:41 UTC (permalink / raw)
  To: wschmidt; +Cc: Segher Boessenkool, David Edelsohn, GCC Patches

Hi Bill,

on 2021/8/12 上午12:24, Bill Schmidt wrote:
> Hi Kewen,
> 
> On 8/11/21 12:44 AM, Kewen.Lin wrote:
>> Hi,
>>
>> This patch is to make prototypes of some Power10 built-in
>> functions consistent with what's in the documentation, as
>> well as the vector version.  Otherwise, useless conversions
>> can be generated in gimple IR, and the vectorized versions
>> will have inconsistent types.
>>
>> Bootstrapped & regtested on powerpc64le-linux-gnu P9 and
>> powerpc64-linux-gnu P8.
>>
>> Is it ok for trunk?
> 
> LGTM.  Maintainers, this is necessary in the short term for the old builtins support, but this fragile thing that people always forget will go away with the new support.  What Kewen is proposing here is correct for now.
> 

Thanks for your review and good to know we won't have this kind of issue with your new support, nice!!

FWIW, for now the bif vectorization still requires this type consistence to make type check happy.


BR,
Kewen

> Thanks,
> Bill
> 
>>
>> BR,
>> Kewen
>> -----
>> gcc/ChangeLog:
>>
>>     * config/rs6000/rs6000-call.c (builtin_function_type): Add unsigned
>>     signedness for some Power10 bifs.

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

* Re: [PATCH] rs6000: Add missing unsigned info for some P10 bifs
  2021-08-11  5:44 [PATCH] rs6000: Add missing unsigned info for some P10 bifs Kewen.Lin
  2021-08-11 16:24 ` Bill Schmidt
@ 2021-08-30  2:24 ` Kewen.Lin
  1 sibling, 0 replies; 4+ messages in thread
From: Kewen.Lin @ 2021-08-30  2:24 UTC (permalink / raw)
  To: Segher Boessenkool; +Cc: Bill Schmidt, David Edelsohn, GCC Patches

on 2021/8/11 下午1:44, Kewen.Lin via Gcc-patches wrote:
> Hi,
> 
> This patch is to make prototypes of some Power10 built-in
> functions consistent with what's in the documentation, as
> well as the vector version.  Otherwise, useless conversions
> can be generated in gimple IR, and the vectorized versions
> will have inconsistent types.
> 
> Bootstrapped & regtested on powerpc64le-linux-gnu P9 and
> powerpc64-linux-gnu P8.
> 
> Is it ok for trunk?
> 

This has been approved by Segher offline, thanks Segher!

Committed in r12-3179.

BR,
Kewen

> BR,
> Kewen
> -----
> gcc/ChangeLog:
> 
> 	* config/rs6000/rs6000-call.c (builtin_function_type): Add unsigned
> 	signedness for some Power10 bifs.
> 



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

end of thread, other threads:[~2021-08-30  2:25 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-08-11  5:44 [PATCH] rs6000: Add missing unsigned info for some P10 bifs Kewen.Lin
2021-08-11 16:24 ` Bill Schmidt
2021-08-13  1:41   ` Kewen.Lin
2021-08-30  2:24 ` Kewen.Lin

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