* [PATCH] middle-end: Apply MASK_LEN_LOAD_LANES/MASK_LEN_STORE_LANES to ivopts/alias
@ 2023-08-30 3:12 Juzhe-Zhong
2023-08-30 7:25 ` Richard Biener
0 siblings, 1 reply; 3+ messages in thread
From: Juzhe-Zhong @ 2023-08-30 3:12 UTC (permalink / raw)
To: gcc-patches; +Cc: richard.sandiford, rguenther, Juzhe-Zhong
Like MASK_LOAD_LANES/MASK_STORE_LANES, add MASK_LEN_ variant.
Bootstrap and Regression on X86 passed.
Ok for trunk?
gcc/ChangeLog:
* tree-ssa-alias.cc (ref_maybe_used_by_call_p_1): Add MASK_LEN_ variant.
(call_may_clobber_ref_p_1): Ditto.
* tree-ssa-loop-ivopts.cc (get_mem_type_for_internal_fn): Ditto.
(get_alias_ptr_type_for_ptr_address): Ditto.
---
gcc/tree-ssa-alias.cc | 3 +++
gcc/tree-ssa-loop-ivopts.cc | 4 ++++
2 files changed, 7 insertions(+)
diff --git a/gcc/tree-ssa-alias.cc b/gcc/tree-ssa-alias.cc
index cf38fe506a8..373940b5f6c 100644
--- a/gcc/tree-ssa-alias.cc
+++ b/gcc/tree-ssa-alias.cc
@@ -2818,11 +2818,13 @@ ref_maybe_used_by_call_p_1 (gcall *call, ao_ref *ref, bool tbaa_p)
case IFN_MASK_LEN_STORE:
return false;
case IFN_MASK_STORE_LANES:
+ case IFN_MASK_LEN_STORE_LANES:
goto process_args;
case IFN_MASK_LOAD:
case IFN_LEN_LOAD:
case IFN_MASK_LEN_LOAD:
case IFN_MASK_LOAD_LANES:
+ case IFN_MASK_LEN_LOAD_LANES:
{
ao_ref rhs_ref;
tree lhs = gimple_call_lhs (call);
@@ -3072,6 +3074,7 @@ call_may_clobber_ref_p_1 (gcall *call, ao_ref *ref, bool tbaa_p)
case IFN_LEN_STORE:
case IFN_MASK_LEN_STORE:
case IFN_MASK_STORE_LANES:
+ case IFN_MASK_LEN_STORE_LANES:
{
tree rhs = gimple_call_arg (call,
internal_fn_stored_value_index (fn));
diff --git a/gcc/tree-ssa-loop-ivopts.cc b/gcc/tree-ssa-loop-ivopts.cc
index d208d9dbd4d..3d3f28f7f3b 100644
--- a/gcc/tree-ssa-loop-ivopts.cc
+++ b/gcc/tree-ssa-loop-ivopts.cc
@@ -2441,6 +2441,7 @@ get_mem_type_for_internal_fn (gcall *call, tree *op_p)
{
case IFN_MASK_LOAD:
case IFN_MASK_LOAD_LANES:
+ case IFN_MASK_LEN_LOAD_LANES:
case IFN_LEN_LOAD:
case IFN_MASK_LEN_LOAD:
if (op_p == gimple_call_arg_ptr (call, 0))
@@ -2449,6 +2450,7 @@ get_mem_type_for_internal_fn (gcall *call, tree *op_p)
case IFN_MASK_STORE:
case IFN_MASK_STORE_LANES:
+ case IFN_MASK_LEN_STORE_LANES:
case IFN_LEN_STORE:
case IFN_MASK_LEN_STORE:
{
@@ -7573,6 +7575,8 @@ get_alias_ptr_type_for_ptr_address (iv_use *use)
case IFN_MASK_STORE:
case IFN_MASK_LOAD_LANES:
case IFN_MASK_STORE_LANES:
+ case IFN_MASK_LEN_LOAD_LANES:
+ case IFN_MASK_LEN_STORE_LANES:
case IFN_LEN_LOAD:
case IFN_LEN_STORE:
case IFN_MASK_LEN_LOAD:
--
2.36.3
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] middle-end: Apply MASK_LEN_LOAD_LANES/MASK_LEN_STORE_LANES to ivopts/alias
2023-08-30 3:12 [PATCH] middle-end: Apply MASK_LEN_LOAD_LANES/MASK_LEN_STORE_LANES to ivopts/alias Juzhe-Zhong
@ 2023-08-30 7:25 ` Richard Biener
2023-08-30 7:35 ` Lehua Ding
0 siblings, 1 reply; 3+ messages in thread
From: Richard Biener @ 2023-08-30 7:25 UTC (permalink / raw)
To: Juzhe-Zhong; +Cc: gcc-patches, richard.sandiford
On Wed, 30 Aug 2023, Juzhe-Zhong wrote:
> Like MASK_LOAD_LANES/MASK_STORE_LANES, add MASK_LEN_ variant.
>
> Bootstrap and Regression on X86 passed.
>
> Ok for trunk?
OK.
> gcc/ChangeLog:
>
> * tree-ssa-alias.cc (ref_maybe_used_by_call_p_1): Add MASK_LEN_ variant.
> (call_may_clobber_ref_p_1): Ditto.
> * tree-ssa-loop-ivopts.cc (get_mem_type_for_internal_fn): Ditto.
> (get_alias_ptr_type_for_ptr_address): Ditto.
>
> ---
> gcc/tree-ssa-alias.cc | 3 +++
> gcc/tree-ssa-loop-ivopts.cc | 4 ++++
> 2 files changed, 7 insertions(+)
>
> diff --git a/gcc/tree-ssa-alias.cc b/gcc/tree-ssa-alias.cc
> index cf38fe506a8..373940b5f6c 100644
> --- a/gcc/tree-ssa-alias.cc
> +++ b/gcc/tree-ssa-alias.cc
> @@ -2818,11 +2818,13 @@ ref_maybe_used_by_call_p_1 (gcall *call, ao_ref *ref, bool tbaa_p)
> case IFN_MASK_LEN_STORE:
> return false;
> case IFN_MASK_STORE_LANES:
> + case IFN_MASK_LEN_STORE_LANES:
> goto process_args;
> case IFN_MASK_LOAD:
> case IFN_LEN_LOAD:
> case IFN_MASK_LEN_LOAD:
> case IFN_MASK_LOAD_LANES:
> + case IFN_MASK_LEN_LOAD_LANES:
> {
> ao_ref rhs_ref;
> tree lhs = gimple_call_lhs (call);
> @@ -3072,6 +3074,7 @@ call_may_clobber_ref_p_1 (gcall *call, ao_ref *ref, bool tbaa_p)
> case IFN_LEN_STORE:
> case IFN_MASK_LEN_STORE:
> case IFN_MASK_STORE_LANES:
> + case IFN_MASK_LEN_STORE_LANES:
> {
> tree rhs = gimple_call_arg (call,
> internal_fn_stored_value_index (fn));
> diff --git a/gcc/tree-ssa-loop-ivopts.cc b/gcc/tree-ssa-loop-ivopts.cc
> index d208d9dbd4d..3d3f28f7f3b 100644
> --- a/gcc/tree-ssa-loop-ivopts.cc
> +++ b/gcc/tree-ssa-loop-ivopts.cc
> @@ -2441,6 +2441,7 @@ get_mem_type_for_internal_fn (gcall *call, tree *op_p)
> {
> case IFN_MASK_LOAD:
> case IFN_MASK_LOAD_LANES:
> + case IFN_MASK_LEN_LOAD_LANES:
> case IFN_LEN_LOAD:
> case IFN_MASK_LEN_LOAD:
> if (op_p == gimple_call_arg_ptr (call, 0))
> @@ -2449,6 +2450,7 @@ get_mem_type_for_internal_fn (gcall *call, tree *op_p)
>
> case IFN_MASK_STORE:
> case IFN_MASK_STORE_LANES:
> + case IFN_MASK_LEN_STORE_LANES:
> case IFN_LEN_STORE:
> case IFN_MASK_LEN_STORE:
> {
> @@ -7573,6 +7575,8 @@ get_alias_ptr_type_for_ptr_address (iv_use *use)
> case IFN_MASK_STORE:
> case IFN_MASK_LOAD_LANES:
> case IFN_MASK_STORE_LANES:
> + case IFN_MASK_LEN_LOAD_LANES:
> + case IFN_MASK_LEN_STORE_LANES:
> case IFN_LEN_LOAD:
> case IFN_LEN_STORE:
> case IFN_MASK_LEN_LOAD:
>
--
Richard Biener <rguenther@suse.de>
SUSE Software Solutions Germany GmbH,
Frankenstrasse 146, 90461 Nuernberg, Germany;
GF: Ivo Totev, Andrew McDonald, Werner Knoblich; (HRB 36809, AG Nuernberg)
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] middle-end: Apply MASK_LEN_LOAD_LANES/MASK_LEN_STORE_LANES to ivopts/alias
2023-08-30 7:25 ` Richard Biener
@ 2023-08-30 7:35 ` Lehua Ding
0 siblings, 0 replies; 3+ messages in thread
From: Lehua Ding @ 2023-08-30 7:35 UTC (permalink / raw)
To: Richard Biener, Juzhe-Zhong; +Cc: gcc-patches, richard.sandiford
Committed, thanks Richard.
On 2023/8/30 15:25, Richard Biener via Gcc-patches wrote:
> On Wed, 30 Aug 2023, Juzhe-Zhong wrote:
>
>> Like MASK_LOAD_LANES/MASK_STORE_LANES, add MASK_LEN_ variant.
>>
>> Bootstrap and Regression on X86 passed.
>>
>> Ok for trunk?
>
> OK.
>
>> gcc/ChangeLog:
>>
>> * tree-ssa-alias.cc (ref_maybe_used_by_call_p_1): Add MASK_LEN_ variant.
>> (call_may_clobber_ref_p_1): Ditto.
>> * tree-ssa-loop-ivopts.cc (get_mem_type_for_internal_fn): Ditto.
>> (get_alias_ptr_type_for_ptr_address): Ditto.
>>
>> ---
>> gcc/tree-ssa-alias.cc | 3 +++
>> gcc/tree-ssa-loop-ivopts.cc | 4 ++++
>> 2 files changed, 7 insertions(+)
>>
>> diff --git a/gcc/tree-ssa-alias.cc b/gcc/tree-ssa-alias.cc
>> index cf38fe506a8..373940b5f6c 100644
>> --- a/gcc/tree-ssa-alias.cc
>> +++ b/gcc/tree-ssa-alias.cc
>> @@ -2818,11 +2818,13 @@ ref_maybe_used_by_call_p_1 (gcall *call, ao_ref *ref, bool tbaa_p)
>> case IFN_MASK_LEN_STORE:
>> return false;
>> case IFN_MASK_STORE_LANES:
>> + case IFN_MASK_LEN_STORE_LANES:
>> goto process_args;
>> case IFN_MASK_LOAD:
>> case IFN_LEN_LOAD:
>> case IFN_MASK_LEN_LOAD:
>> case IFN_MASK_LOAD_LANES:
>> + case IFN_MASK_LEN_LOAD_LANES:
>> {
>> ao_ref rhs_ref;
>> tree lhs = gimple_call_lhs (call);
>> @@ -3072,6 +3074,7 @@ call_may_clobber_ref_p_1 (gcall *call, ao_ref *ref, bool tbaa_p)
>> case IFN_LEN_STORE:
>> case IFN_MASK_LEN_STORE:
>> case IFN_MASK_STORE_LANES:
>> + case IFN_MASK_LEN_STORE_LANES:
>> {
>> tree rhs = gimple_call_arg (call,
>> internal_fn_stored_value_index (fn));
>> diff --git a/gcc/tree-ssa-loop-ivopts.cc b/gcc/tree-ssa-loop-ivopts.cc
>> index d208d9dbd4d..3d3f28f7f3b 100644
>> --- a/gcc/tree-ssa-loop-ivopts.cc
>> +++ b/gcc/tree-ssa-loop-ivopts.cc
>> @@ -2441,6 +2441,7 @@ get_mem_type_for_internal_fn (gcall *call, tree *op_p)
>> {
>> case IFN_MASK_LOAD:
>> case IFN_MASK_LOAD_LANES:
>> + case IFN_MASK_LEN_LOAD_LANES:
>> case IFN_LEN_LOAD:
>> case IFN_MASK_LEN_LOAD:
>> if (op_p == gimple_call_arg_ptr (call, 0))
>> @@ -2449,6 +2450,7 @@ get_mem_type_for_internal_fn (gcall *call, tree *op_p)
>>
>> case IFN_MASK_STORE:
>> case IFN_MASK_STORE_LANES:
>> + case IFN_MASK_LEN_STORE_LANES:
>> case IFN_LEN_STORE:
>> case IFN_MASK_LEN_STORE:
>> {
>> @@ -7573,6 +7575,8 @@ get_alias_ptr_type_for_ptr_address (iv_use *use)
>> case IFN_MASK_STORE:
>> case IFN_MASK_LOAD_LANES:
>> case IFN_MASK_STORE_LANES:
>> + case IFN_MASK_LEN_LOAD_LANES:
>> + case IFN_MASK_LEN_STORE_LANES:
>> case IFN_LEN_LOAD:
>> case IFN_LEN_STORE:
>> case IFN_MASK_LEN_LOAD:
>>
>
--
Best,
Lehua
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2023-08-30 7:35 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-08-30 3:12 [PATCH] middle-end: Apply MASK_LEN_LOAD_LANES/MASK_LEN_STORE_LANES to ivopts/alias Juzhe-Zhong
2023-08-30 7:25 ` Richard Biener
2023-08-30 7:35 ` Lehua Ding
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).