* [PATCH] arm: Restrict support of vectors of boolean immediates (PR target/104662)
@ 2022-04-20 8:50 Christophe Lyon
2022-05-04 7:50 ` Christophe Lyon
0 siblings, 1 reply; 4+ messages in thread
From: Christophe Lyon @ 2022-04-20 8:50 UTC (permalink / raw)
To: gcc-patches
This simple patch avoids the ICE described in the PR:
internal compiler error: in simd_valid_immediate, at config/arm/arm.cc:12866
with an early exit from simd_valid_immediate if we are trying to
handle a vector of booleans and MVE is not enabled.
We still get an ICE when compiling the existing
gcc.dg/rtl/arm/mve-vxbi.c without -march=armv8.1-m.main+mve:
error: unrecognizable insn:
(insn 7 5 8 2 (set (reg:V4BI 114)
(const_vector:V4BI [
(const_int 1 [0x1])
(const_int 0 [0]) repeated x2
(const_int 1 [0x1])
])) -1
(nil))
during RTL pass: ira
but there's little we can do since the testcase explicitly creates
vectors of booleans which do need MVE.
That is the reason why I do not add a testcase.
2022-04-19 Christophe Lyon <christophe.lyon@arm.com>
PR target/104662
* config/arm/arm.cc (simd_valid_immediate): Exit when input is a
vector of booleans and MVE is not enabled.
---
gcc/config/arm/arm.cc | 3 +++
1 file changed, 3 insertions(+)
diff --git a/gcc/config/arm/arm.cc b/gcc/config/arm/arm.cc
index 14e2fdfeafa..69a18c2f157 100644
--- a/gcc/config/arm/arm.cc
+++ b/gcc/config/arm/arm.cc
@@ -12849,6 +12849,9 @@ simd_valid_immediate (rtx op, machine_mode mode, int inverse,
|| n_elts * innersize != 16))
return -1;
+ if (!TARGET_HAVE_MVE && GET_MODE_CLASS (mode) == MODE_VECTOR_BOOL)
+ return -1;
+
/* Vectors of float constants. */
if (GET_MODE_CLASS (mode) == MODE_VECTOR_FLOAT)
{
--
2.25.1
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] arm: Restrict support of vectors of boolean immediates (PR target/104662)
2022-04-20 8:50 [PATCH] arm: Restrict support of vectors of boolean immediates (PR target/104662) Christophe Lyon
@ 2022-05-04 7:50 ` Christophe Lyon
2022-05-04 8:03 ` Kyrylo Tkachov
0 siblings, 1 reply; 4+ messages in thread
From: Christophe Lyon @ 2022-05-04 7:50 UTC (permalink / raw)
To: gcc-patches
ping?
On 4/20/22 10:50, Christophe Lyon wrote:
> This simple patch avoids the ICE described in the PR:
> internal compiler error: in simd_valid_immediate, at config/arm/arm.cc:12866
>
> with an early exit from simd_valid_immediate if we are trying to
> handle a vector of booleans and MVE is not enabled.
>
> We still get an ICE when compiling the existing
> gcc.dg/rtl/arm/mve-vxbi.c without -march=armv8.1-m.main+mve:
>
> error: unrecognizable insn:
> (insn 7 5 8 2 (set (reg:V4BI 114)
> (const_vector:V4BI [
> (const_int 1 [0x1])
> (const_int 0 [0]) repeated x2
> (const_int 1 [0x1])
> ])) -1
> (nil))
> during RTL pass: ira
>
> but there's little we can do since the testcase explicitly creates
> vectors of booleans which do need MVE.
>
> That is the reason why I do not add a testcase.
>
> 2022-04-19 Christophe Lyon <christophe.lyon@arm.com>
>
> PR target/104662
> * config/arm/arm.cc (simd_valid_immediate): Exit when input is a
> vector of booleans and MVE is not enabled.
> ---
> gcc/config/arm/arm.cc | 3 +++
> 1 file changed, 3 insertions(+)
>
> diff --git a/gcc/config/arm/arm.cc b/gcc/config/arm/arm.cc
> index 14e2fdfeafa..69a18c2f157 100644
> --- a/gcc/config/arm/arm.cc
> +++ b/gcc/config/arm/arm.cc
> @@ -12849,6 +12849,9 @@ simd_valid_immediate (rtx op, machine_mode mode, int inverse,
> || n_elts * innersize != 16))
> return -1;
>
> + if (!TARGET_HAVE_MVE && GET_MODE_CLASS (mode) == MODE_VECTOR_BOOL)
> + return -1;
> +
> /* Vectors of float constants. */
> if (GET_MODE_CLASS (mode) == MODE_VECTOR_FLOAT)
> {
^ permalink raw reply [flat|nested] 4+ messages in thread
* RE: [PATCH] arm: Restrict support of vectors of boolean immediates (PR target/104662)
2022-05-04 7:50 ` Christophe Lyon
@ 2022-05-04 8:03 ` Kyrylo Tkachov
2022-05-04 8:22 ` Christophe Lyon
0 siblings, 1 reply; 4+ messages in thread
From: Kyrylo Tkachov @ 2022-05-04 8:03 UTC (permalink / raw)
To: Christophe Lyon, gcc-patches
> -----Original Message-----
> From: Gcc-patches <gcc-patches-
> bounces+kyrylo.tkachov=arm.com@gcc.gnu.org> On Behalf Of Christophe
> Lyon via Gcc-patches
> Sent: Wednesday, May 4, 2022 8:51 AM
> To: gcc-patches@gcc.gnu.org
> Subject: Re: [PATCH] arm: Restrict support of vectors of boolean immediates
> (PR target/104662)
>
> ping?
>
> On 4/20/22 10:50, Christophe Lyon wrote:
> > This simple patch avoids the ICE described in the PR:
> > internal compiler error: in simd_valid_immediate, at
> config/arm/arm.cc:12866
> >
> > with an early exit from simd_valid_immediate if we are trying to
> > handle a vector of booleans and MVE is not enabled.
> >
> > We still get an ICE when compiling the existing
> > gcc.dg/rtl/arm/mve-vxbi.c without -march=armv8.1-m.main+mve:
> >
> > error: unrecognizable insn:
> > (insn 7 5 8 2 (set (reg:V4BI 114)
> > (const_vector:V4BI [
> > (const_int 1 [0x1])
> > (const_int 0 [0]) repeated x2
> > (const_int 1 [0x1])
> > ])) -1
> > (nil))
> > during RTL pass: ira
> >
> > but there's little we can do since the testcase explicitly creates
> > vectors of booleans which do need MVE.
> >
> > That is the reason why I do not add a testcase.
Ok if testing is fine.
Thanks,
Kyrill
> >
> > 2022-04-19 Christophe Lyon <christophe.lyon@arm.com>
> >
> > PR target/104662
> > * config/arm/arm.cc (simd_valid_immediate): Exit when input is a
> > vector of booleans and MVE is not enabled.
> > ---
> > gcc/config/arm/arm.cc | 3 +++
> > 1 file changed, 3 insertions(+)
> >
> > diff --git a/gcc/config/arm/arm.cc b/gcc/config/arm/arm.cc
> > index 14e2fdfeafa..69a18c2f157 100644
> > --- a/gcc/config/arm/arm.cc
> > +++ b/gcc/config/arm/arm.cc
> > @@ -12849,6 +12849,9 @@ simd_valid_immediate (rtx op, machine_mode
> mode, int inverse,
> > || n_elts * innersize != 16))
> > return -1;
> >
> > + if (!TARGET_HAVE_MVE && GET_MODE_CLASS (mode) ==
> MODE_VECTOR_BOOL)
> > + return -1;
> > +
> > /* Vectors of float constants. */
> > if (GET_MODE_CLASS (mode) == MODE_VECTOR_FLOAT)
> > {
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] arm: Restrict support of vectors of boolean immediates (PR target/104662)
2022-05-04 8:03 ` Kyrylo Tkachov
@ 2022-05-04 8:22 ` Christophe Lyon
0 siblings, 0 replies; 4+ messages in thread
From: Christophe Lyon @ 2022-05-04 8:22 UTC (permalink / raw)
To: Kyrylo Tkachov, gcc-patches
On 5/4/22 10:03, Kyrylo Tkachov wrote:
>
>
>> -----Original Message-----
>> From: Gcc-patches <gcc-patches-
>> bounces+kyrylo.tkachov=arm.com@gcc.gnu.org> On Behalf Of Christophe
>> Lyon via Gcc-patches
>> Sent: Wednesday, May 4, 2022 8:51 AM
>> To: gcc-patches@gcc.gnu.org
>> Subject: Re: [PATCH] arm: Restrict support of vectors of boolean immediates
>> (PR target/104662)
>>
>> ping?
>>
>> On 4/20/22 10:50, Christophe Lyon wrote:
>>> This simple patch avoids the ICE described in the PR:
>>> internal compiler error: in simd_valid_immediate, at
>> config/arm/arm.cc:12866
>>>
>>> with an early exit from simd_valid_immediate if we are trying to
>>> handle a vector of booleans and MVE is not enabled.
>>>
>>> We still get an ICE when compiling the existing
>>> gcc.dg/rtl/arm/mve-vxbi.c without -march=armv8.1-m.main+mve:
>>>
>>> error: unrecognizable insn:
>>> (insn 7 5 8 2 (set (reg:V4BI 114)
>>> (const_vector:V4BI [
>>> (const_int 1 [0x1])
>>> (const_int 0 [0]) repeated x2
>>> (const_int 1 [0x1])
>>> ])) -1
>>> (nil))
>>> during RTL pass: ira
>>>
>>> but there's little we can do since the testcase explicitly creates
>>> vectors of booleans which do need MVE.
>>>
>>> That is the reason why I do not add a testcase.
>
> Ok if testing is fine.
Thanks, pushed as r13-102-ge2285af309000b
Christophe
> Thanks,
> Kyrill
>
>>>
>>> 2022-04-19 Christophe Lyon <christophe.lyon@arm.com>
>>>
>>> PR target/104662
>>> * config/arm/arm.cc (simd_valid_immediate): Exit when input is a
>>> vector of booleans and MVE is not enabled.
>>> ---
>>> gcc/config/arm/arm.cc | 3 +++
>>> 1 file changed, 3 insertions(+)
>>>
>>> diff --git a/gcc/config/arm/arm.cc b/gcc/config/arm/arm.cc
>>> index 14e2fdfeafa..69a18c2f157 100644
>>> --- a/gcc/config/arm/arm.cc
>>> +++ b/gcc/config/arm/arm.cc
>>> @@ -12849,6 +12849,9 @@ simd_valid_immediate (rtx op, machine_mode
>> mode, int inverse,
>>> || n_elts * innersize != 16))
>>> return -1;
>>>
>>> + if (!TARGET_HAVE_MVE && GET_MODE_CLASS (mode) ==
>> MODE_VECTOR_BOOL)
>>> + return -1;
>>> +
>>> /* Vectors of float constants. */
>>> if (GET_MODE_CLASS (mode) == MODE_VECTOR_FLOAT)
>>> {
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2022-05-04 8:22 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-04-20 8:50 [PATCH] arm: Restrict support of vectors of boolean immediates (PR target/104662) Christophe Lyon
2022-05-04 7:50 ` Christophe Lyon
2022-05-04 8:03 ` Kyrylo Tkachov
2022-05-04 8:22 ` Christophe Lyon
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).