* [PATCH] rs6000: Move V2DI vec_neg under power8-vector [PR105271]
@ 2022-04-15 8:08 Kewen.Lin
2022-04-26 15:16 ` Jakub Jelinek
0 siblings, 1 reply; 4+ messages in thread
From: Kewen.Lin @ 2022-04-15 8:08 UTC (permalink / raw)
To: GCC Patches; +Cc: Segher Boessenkool, David Edelsohn, Peter Bergner
Hi,
As PR105271 shows, __builtin_altivec_neg_v2di requires option
-mpower8-vector as its pattern expansion relies on subv2di which
has guard VECTOR_UNIT_P8_VECTOR_P (V2DImode). This fix is to move
the related lines for __builtin_altivec_neg_v2di to the section
of stanza power8-vector.
Bootstrapped and regtested on powerpc64-linux-gnu P8 and
powerpc64le-linux-gnu P9 and P10.
Is it ok for trunk?
BR,
Kewen
-----
PR target/105271
gcc/ChangeLog:
* config/rs6000/rs6000-builtins.def (NEG_V2DI): Move to [power8-vector]
stanza.
gcc/testsuite/ChangeLog:
* gcc.target/powerpc/pr105271.c: New test.
---
gcc/config/rs6000/rs6000-builtins.def | 6 +++---
gcc/testsuite/gcc.target/powerpc/pr105271.c | 14 ++++++++++++++
2 files changed, 17 insertions(+), 3 deletions(-)
create mode 100644 gcc/testsuite/gcc.target/powerpc/pr105271.c
diff --git a/gcc/config/rs6000/rs6000-builtins.def b/gcc/config/rs6000/rs6000-builtins.def
index 0f527c5d78f..f4a9f24bcc5 100644
--- a/gcc/config/rs6000/rs6000-builtins.def
+++ b/gcc/config/rs6000/rs6000-builtins.def
@@ -1190,9 +1190,6 @@
const vd __builtin_altivec_neg_v2df (vd);
NEG_V2DF negv2df2 {}
- const vsll __builtin_altivec_neg_v2di (vsll);
- NEG_V2DI negv2di2 {}
-
void __builtin_altivec_stvx_v2df (vd, signed long, void *);
STVX_V2DF altivec_stvx_v2df {stvec}
@@ -2136,6 +2133,9 @@
const vus __builtin_altivec_nand_v8hi_uns (vus, vus);
NAND_V8HI_UNS nandv8hi3 {}
+ const vsll __builtin_altivec_neg_v2di (vsll);
+ NEG_V2DI negv2di2 {}
+
const vsc __builtin_altivec_orc_v16qi (vsc, vsc);
ORC_V16QI orcv16qi3 {}
diff --git a/gcc/testsuite/gcc.target/powerpc/pr105271.c b/gcc/testsuite/gcc.target/powerpc/pr105271.c
new file mode 100644
index 00000000000..1c5f88cadcf
--- /dev/null
+++ b/gcc/testsuite/gcc.target/powerpc/pr105271.c
@@ -0,0 +1,14 @@
+/* { dg-require-effective-target powerpc_vsx_ok } */
+/* { dg-options "-mdejagnu-cpu=power7" } */
+
+/* It's to verify no ICE here, ignore error messages about
+ the required options for vec_neg here. */
+/* { dg-excess-errors "pr105271" } */
+
+#include <altivec.h>
+
+vector signed long long
+test (vector signed long long x)
+{
+ return vec_neg (x);
+}
--
2.27.0
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] rs6000: Move V2DI vec_neg under power8-vector [PR105271]
2022-04-15 8:08 [PATCH] rs6000: Move V2DI vec_neg under power8-vector [PR105271] Kewen.Lin
@ 2022-04-26 15:16 ` Jakub Jelinek
2022-04-26 15:25 ` Segher Boessenkool
0 siblings, 1 reply; 4+ messages in thread
From: Jakub Jelinek @ 2022-04-26 15:16 UTC (permalink / raw)
To: Segher Boessenkool, Kewen.Lin; +Cc: GCC Patches, Peter Bergner, David Edelsohn
Hi!
On Fri, Apr 15, 2022 at 04:08:15PM +0800, Kewen.Lin via Gcc-patches wrote:
> As PR105271 shows, __builtin_altivec_neg_v2di requires option
> -mpower8-vector as its pattern expansion relies on subv2di which
> has guard VECTOR_UNIT_P8_VECTOR_P (V2DImode). This fix is to move
> the related lines for __builtin_altivec_neg_v2di to the section
> of stanza power8-vector.
>
> Bootstrapped and regtested on powerpc64-linux-gnu P8 and
> powerpc64le-linux-gnu P9 and P10.
>
> Is it ok for trunk?
>
> BR,
> Kewen
> -----
> PR target/105271
>
> gcc/ChangeLog:
>
> * config/rs6000/rs6000-builtins.def (NEG_V2DI): Move to [power8-vector]
> stanza.
>
> gcc/testsuite/ChangeLog:
>
> * gcc.target/powerpc/pr105271.c: New test.
I'd like to ping this patch, one of the last few remaining P1s we have for
GCC 12.
Thanks.
Jakub
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] rs6000: Move V2DI vec_neg under power8-vector [PR105271]
2022-04-26 15:16 ` Jakub Jelinek
@ 2022-04-26 15:25 ` Segher Boessenkool
2022-04-27 1:49 ` Kewen.Lin
0 siblings, 1 reply; 4+ messages in thread
From: Segher Boessenkool @ 2022-04-26 15:25 UTC (permalink / raw)
To: Jakub Jelinek; +Cc: Kewen.Lin, GCC Patches, Peter Bergner, David Edelsohn
On Tue, Apr 26, 2022 at 05:16:18PM +0200, Jakub Jelinek wrote:
> Hi!
>
> On Fri, Apr 15, 2022 at 04:08:15PM +0800, Kewen.Lin via Gcc-patches wrote:
> > As PR105271 shows, __builtin_altivec_neg_v2di requires option
> > -mpower8-vector as its pattern expansion relies on subv2di which
> > has guard VECTOR_UNIT_P8_VECTOR_P (V2DImode). This fix is to move
> > the related lines for __builtin_altivec_neg_v2di to the section
> > of stanza power8-vector.
> >
> > Bootstrapped and regtested on powerpc64-linux-gnu P8 and
> > powerpc64le-linux-gnu P9 and P10.
> >
> > Is it ok for trunk?
> >
> > BR,
> > Kewen
> > -----
> > PR target/105271
> >
> > gcc/ChangeLog:
> >
> > * config/rs6000/rs6000-builtins.def (NEG_V2DI): Move to [power8-vector]
> > stanza.
> >
> > gcc/testsuite/ChangeLog:
> >
> > * gcc.target/powerpc/pr105271.c: New test.
>
> I'd like to ping this patch, one of the last few remaining P1s we have for
> GCC 12.
Heh. I approved it this morning (off-list). Kewen will commit it
soonish (somewhere during your night probably) :-)
Segher
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] rs6000: Move V2DI vec_neg under power8-vector [PR105271]
2022-04-26 15:25 ` Segher Boessenkool
@ 2022-04-27 1:49 ` Kewen.Lin
0 siblings, 0 replies; 4+ messages in thread
From: Kewen.Lin @ 2022-04-27 1:49 UTC (permalink / raw)
To: Segher Boessenkool, Jakub Jelinek
Cc: GCC Patches, Peter Bergner, David Edelsohn
on 2022/4/26 11:25 PM, Segher Boessenkool wrote:
> On Tue, Apr 26, 2022 at 05:16:18PM +0200, Jakub Jelinek wrote:
>> Hi!
>>
>> On Fri, Apr 15, 2022 at 04:08:15PM +0800, Kewen.Lin via Gcc-patches wrote:
>>> As PR105271 shows, __builtin_altivec_neg_v2di requires option
>>> -mpower8-vector as its pattern expansion relies on subv2di which
>>> has guard VECTOR_UNIT_P8_VECTOR_P (V2DImode). This fix is to move
>>> the related lines for __builtin_altivec_neg_v2di to the section
>>> of stanza power8-vector.
>>>
>>> Bootstrapped and regtested on powerpc64-linux-gnu P8 and
>>> powerpc64le-linux-gnu P9 and P10.
>>>
>>> Is it ok for trunk?
>>>
>>> BR,
>>> Kewen
>>> -----
>>> PR target/105271
>>>
>>> gcc/ChangeLog:
>>>
>>> * config/rs6000/rs6000-builtins.def (NEG_V2DI): Move to [power8-vector]
>>> stanza.
>>>
>>> gcc/testsuite/ChangeLog:
>>>
>>> * gcc.target/powerpc/pr105271.c: New test.
>>
>> I'd like to ping this patch, one of the last few remaining P1s we have for
>> GCC 12.
>
> Heh. I approved it this morning (off-list). Kewen will commit it
> soonish (somewhere during your night probably) :-)
>
Thank you both! I just committed it as r12-8275.
BR,
Kewen
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2022-04-27 1:49 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-04-15 8:08 [PATCH] rs6000: Move V2DI vec_neg under power8-vector [PR105271] Kewen.Lin
2022-04-26 15:16 ` Jakub Jelinek
2022-04-26 15:25 ` Segher Boessenkool
2022-04-27 1:49 ` 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).