* [PATCH] rs6000: Don't turn off VSX for P9 VECTOR when TARGET_AVOID_XFORM set
@ 2021-12-29 9:36 Kewen.Lin
2022-01-13 2:03 ` PING^1 " Kewen.Lin
0 siblings, 1 reply; 3+ messages in thread
From: Kewen.Lin @ 2021-12-29 9:36 UTC (permalink / raw)
To: GCC Patches
Cc: Segher Boessenkool, David Edelsohn, Bill Schmidt, Michael Meissner
Hi,
When TARGET_AVOID_XFORM is set, we turn off VSX. But at least from
ISA3.0 (Power9), we support DQ form vector load/store. This patch
is to make it not clear VSX when P9 VECTOR supported, it also checks
some flags which P9 VECTOR relies on, otherwise those flags could
disable P9 VECTOR later.
Bootstrapped and regtested on powerpc64le-linux-gnu P9 and
powerpc64-linux-gnu P8.
Is it ok for trunk?
BR,
Kewen
-----
gcc/ChangeLog:
* config/rs6000/rs6000.c (rs6000_option_override_internal): Consider
P9 VECTOR when determining to disable VSX for TARGET_AVOID_XFORM.
---
gcc/config/rs6000/rs6000.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/gcc/config/rs6000/rs6000.c b/gcc/config/rs6000/rs6000.c
index 66b01e589b0..c020947abc8 100644
--- a/gcc/config/rs6000/rs6000.c
+++ b/gcc/config/rs6000/rs6000.c
@@ -3865,7 +3865,10 @@ rs6000_option_override_internal (bool global_init_p)
rs6000_isa_flags_explicit |= OPTION_MASK_VSX;
}
}
- else if (TARGET_AVOID_XFORM > 0)
+ else if (TARGET_AVOID_XFORM > 0
+ /* Exclude P9 VECTOR which supports DQ form, but need to check
+ some flags which are able to disable it as well. */
+ && !(TARGET_ALTIVEC && TARGET_P8_VECTOR && TARGET_P9_VECTOR))
msg = N_("%<-mvsx%> needs indexed addressing");
else if (!TARGET_ALTIVEC && (rs6000_isa_flags_explicit
& OPTION_MASK_ALTIVEC))
--
2.27.0
^ permalink raw reply [flat|nested] 3+ messages in thread
* PING^1 [PATCH] rs6000: Don't turn off VSX for P9 VECTOR when TARGET_AVOID_XFORM set
2021-12-29 9:36 [PATCH] rs6000: Don't turn off VSX for P9 VECTOR when TARGET_AVOID_XFORM set Kewen.Lin
@ 2022-01-13 2:03 ` Kewen.Lin
2022-01-26 2:17 ` PING^2 " Kewen.Lin
0 siblings, 1 reply; 3+ messages in thread
From: Kewen.Lin @ 2022-01-13 2:03 UTC (permalink / raw)
To: GCC Patches
Cc: Michael Meissner, Bill Schmidt, David Edelsohn, Segher Boessenkool
Gentle ping:
https://gcc.gnu.org/pipermail/gcc-patches/2021-December/587449.html
on 2021/12/29 下午5:36, Kewen.Lin via Gcc-patches wrote:
> Hi,
>
> When TARGET_AVOID_XFORM is set, we turn off VSX. But at least from
> ISA3.0 (Power9), we support DQ form vector load/store. This patch
> is to make it not clear VSX when P9 VECTOR supported, it also checks
> some flags which P9 VECTOR relies on, otherwise those flags could
> disable P9 VECTOR later.
>
> Bootstrapped and regtested on powerpc64le-linux-gnu P9 and
> powerpc64-linux-gnu P8.
>
> Is it ok for trunk?
>
> BR,
> Kewen
> -----
> gcc/ChangeLog:
>
> * config/rs6000/rs6000.c (rs6000_option_override_internal): Consider
> P9 VECTOR when determining to disable VSX for TARGET_AVOID_XFORM.
> ---
> gcc/config/rs6000/rs6000.c | 5 ++++-
> 1 file changed, 4 insertions(+), 1 deletion(-)
>
> diff --git a/gcc/config/rs6000/rs6000.c b/gcc/config/rs6000/rs6000.c
> index 66b01e589b0..c020947abc8 100644
> --- a/gcc/config/rs6000/rs6000.c
> +++ b/gcc/config/rs6000/rs6000.c
> @@ -3865,7 +3865,10 @@ rs6000_option_override_internal (bool global_init_p)
> rs6000_isa_flags_explicit |= OPTION_MASK_VSX;
> }
> }
> - else if (TARGET_AVOID_XFORM > 0)
> + else if (TARGET_AVOID_XFORM > 0
> + /* Exclude P9 VECTOR which supports DQ form, but need to check
> + some flags which are able to disable it as well. */
> + && !(TARGET_ALTIVEC && TARGET_P8_VECTOR && TARGET_P9_VECTOR))
> msg = N_("%<-mvsx%> needs indexed addressing");
> else if (!TARGET_ALTIVEC && (rs6000_isa_flags_explicit
> & OPTION_MASK_ALTIVEC))
> --
> 2.27.0
>
^ permalink raw reply [flat|nested] 3+ messages in thread
* PING^2 [PATCH] rs6000: Don't turn off VSX for P9 VECTOR when TARGET_AVOID_XFORM set
2022-01-13 2:03 ` PING^1 " Kewen.Lin
@ 2022-01-26 2:17 ` Kewen.Lin
0 siblings, 0 replies; 3+ messages in thread
From: Kewen.Lin @ 2022-01-26 2:17 UTC (permalink / raw)
To: GCC Patches
Cc: Michael Meissner, Bill Schmidt, Segher Boessenkool, David Edelsohn
Gentle ping:
https://gcc.gnu.org/pipermail/gcc-patches/2021-December/587449.html
BR,
Kewen
> on 2021/12/29 下午5:36, Kewen.Lin via Gcc-patches wrote:
>> Hi,
>>
>> When TARGET_AVOID_XFORM is set, we turn off VSX. But at least from
>> ISA3.0 (Power9), we support DQ form vector load/store. This patch
>> is to make it not clear VSX when P9 VECTOR supported, it also checks
>> some flags which P9 VECTOR relies on, otherwise those flags could
>> disable P9 VECTOR later.
>>
>> Bootstrapped and regtested on powerpc64le-linux-gnu P9 and
>> powerpc64-linux-gnu P8.
>>
>> Is it ok for trunk?
>>
>> BR,
>> Kewen
>> -----
>> gcc/ChangeLog:
>>
>> * config/rs6000/rs6000.c (rs6000_option_override_internal): Consider
>> P9 VECTOR when determining to disable VSX for TARGET_AVOID_XFORM.
>> ---
>> gcc/config/rs6000/rs6000.c | 5 ++++-
>> 1 file changed, 4 insertions(+), 1 deletion(-)
>>
>> diff --git a/gcc/config/rs6000/rs6000.c b/gcc/config/rs6000/rs6000.c
>> index 66b01e589b0..c020947abc8 100644
>> --- a/gcc/config/rs6000/rs6000.c
>> +++ b/gcc/config/rs6000/rs6000.c
>> @@ -3865,7 +3865,10 @@ rs6000_option_override_internal (bool global_init_p)
>> rs6000_isa_flags_explicit |= OPTION_MASK_VSX;
>> }
>> }
>> - else if (TARGET_AVOID_XFORM > 0)
>> + else if (TARGET_AVOID_XFORM > 0
>> + /* Exclude P9 VECTOR which supports DQ form, but need to check
>> + some flags which are able to disable it as well. */
>> + && !(TARGET_ALTIVEC && TARGET_P8_VECTOR && TARGET_P9_VECTOR))
>> msg = N_("%<-mvsx%> needs indexed addressing");
>> else if (!TARGET_ALTIVEC && (rs6000_isa_flags_explicit
>> & OPTION_MASK_ALTIVEC))
>> --
>> 2.27.0
>>
>
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2022-01-26 2:17 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-12-29 9:36 [PATCH] rs6000: Don't turn off VSX for P9 VECTOR when TARGET_AVOID_XFORM set Kewen.Lin
2022-01-13 2:03 ` PING^1 " Kewen.Lin
2022-01-26 2:17 ` PING^2 " 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).