public inbox for gcc-cvs@sourceware.org
help / color / mirror / Atom feed
* [gcc(refs/vendors/riscv/heads/gcc-13-with-riscv-opts)] LOOP IVOPTS: Apply LEN_MASK_{LOAD, STORE}
@ 2023-06-26 20:56 Jeff Law
0 siblings, 0 replies; 2+ messages in thread
From: Jeff Law @ 2023-06-26 20:56 UTC (permalink / raw)
To: gcc-cvs
https://gcc.gnu.org/g:0fb73df047d385eb4b7f1d09148eec94ec615f1f
commit 0fb73df047d385eb4b7f1d09148eec94ec615f1f
Author: Ju-Zhe Zhong <juzhe.zhong@rivai.ai>
Date: Sat Jun 24 07:41:57 2023 +0800
LOOP IVOPTS: Apply LEN_MASK_{LOAD,STORE}
Hi, Jeff. I fix format as you suggested.
Ok for trunk ?
gcc/ChangeLog:
* tree-ssa-loop-ivopts.cc (get_mem_type_for_internal_fn):
Apply LEN_MASK_{LOAD,STORE}.
Diff:
---
gcc/tree-ssa-loop-ivopts.cc | 14 +++++++++++---
1 file changed, 11 insertions(+), 3 deletions(-)
diff --git a/gcc/tree-ssa-loop-ivopts.cc b/gcc/tree-ssa-loop-ivopts.cc
index 3ca5adc99dd..f501070c917 100644
--- a/gcc/tree-ssa-loop-ivopts.cc
+++ b/gcc/tree-ssa-loop-ivopts.cc
@@ -2439,6 +2439,7 @@ get_mem_type_for_internal_fn (gcall *call, tree *op_p)
case IFN_MASK_LOAD:
case IFN_MASK_LOAD_LANES:
case IFN_LEN_LOAD:
+ case IFN_LEN_MASK_LOAD:
if (op_p == gimple_call_arg_ptr (call, 0))
return TREE_TYPE (gimple_call_lhs (call));
return NULL_TREE;
@@ -2446,9 +2447,16 @@ get_mem_type_for_internal_fn (gcall *call, tree *op_p)
case IFN_MASK_STORE:
case IFN_MASK_STORE_LANES:
case IFN_LEN_STORE:
- if (op_p == gimple_call_arg_ptr (call, 0))
- return TREE_TYPE (gimple_call_arg (call, 3));
- return NULL_TREE;
+ case IFN_LEN_MASK_STORE:
+ {
+ if (op_p == gimple_call_arg_ptr (call, 0))
+ {
+ internal_fn ifn = gimple_call_internal_fn (call);
+ int index = internal_fn_stored_value_index (ifn);
+ return TREE_TYPE (gimple_call_arg (call, index));
+ }
+ return NULL_TREE;
+ }
default:
return NULL_TREE;
^ permalink raw reply [flat|nested] 2+ messages in thread
* [gcc(refs/vendors/riscv/heads/gcc-13-with-riscv-opts)] LOOP IVOPTS: Apply LEN_MASK_{LOAD, STORE}
@ 2023-07-14 2:48 Jeff Law
0 siblings, 0 replies; 2+ messages in thread
From: Jeff Law @ 2023-07-14 2:48 UTC (permalink / raw)
To: gcc-cvs
https://gcc.gnu.org/g:0f36ebfaaf94c15cd11fb9b06734b780e6855e4c
commit 0f36ebfaaf94c15cd11fb9b06734b780e6855e4c
Author: Ju-Zhe Zhong <juzhe.zhong@rivai.ai>
Date: Sat Jun 24 07:41:57 2023 +0800
LOOP IVOPTS: Apply LEN_MASK_{LOAD,STORE}
Hi, Jeff. I fix format as you suggested.
Ok for trunk ?
gcc/ChangeLog:
* tree-ssa-loop-ivopts.cc (get_mem_type_for_internal_fn):
Apply LEN_MASK_{LOAD,STORE}.
Diff:
---
gcc/tree-ssa-loop-ivopts.cc | 14 +++++++++++---
1 file changed, 11 insertions(+), 3 deletions(-)
diff --git a/gcc/tree-ssa-loop-ivopts.cc b/gcc/tree-ssa-loop-ivopts.cc
index 3ca5adc99dd..f501070c917 100644
--- a/gcc/tree-ssa-loop-ivopts.cc
+++ b/gcc/tree-ssa-loop-ivopts.cc
@@ -2439,6 +2439,7 @@ get_mem_type_for_internal_fn (gcall *call, tree *op_p)
case IFN_MASK_LOAD:
case IFN_MASK_LOAD_LANES:
case IFN_LEN_LOAD:
+ case IFN_LEN_MASK_LOAD:
if (op_p == gimple_call_arg_ptr (call, 0))
return TREE_TYPE (gimple_call_lhs (call));
return NULL_TREE;
@@ -2446,9 +2447,16 @@ get_mem_type_for_internal_fn (gcall *call, tree *op_p)
case IFN_MASK_STORE:
case IFN_MASK_STORE_LANES:
case IFN_LEN_STORE:
- if (op_p == gimple_call_arg_ptr (call, 0))
- return TREE_TYPE (gimple_call_arg (call, 3));
- return NULL_TREE;
+ case IFN_LEN_MASK_STORE:
+ {
+ if (op_p == gimple_call_arg_ptr (call, 0))
+ {
+ internal_fn ifn = gimple_call_internal_fn (call);
+ int index = internal_fn_stored_value_index (ifn);
+ return TREE_TYPE (gimple_call_arg (call, index));
+ }
+ return NULL_TREE;
+ }
default:
return NULL_TREE;
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2023-07-14 2:48 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-06-26 20:56 [gcc(refs/vendors/riscv/heads/gcc-13-with-riscv-opts)] LOOP IVOPTS: Apply LEN_MASK_{LOAD, STORE} Jeff Law
2023-07-14 2:48 Jeff Law
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).