aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJuzhe-Zhong <juzhe.zhong@rivai.ai>2023-08-30 11:12:01 +0800
committerLehua Ding <lehua.ding@rivai.ai>2023-08-30 15:31:43 +0800
commit0394184cebc15e5e3f13d04d9ffbc787a16018bd (patch)
tree6b6b50243f22705fe994ee938623c1a2109019a5
parenta248e1cc860821b96a42be96478257c4964a7c2a (diff)
downloadgcc-0394184cebc15e5e3f13d04d9ffbc787a16018bd.zip
gcc-0394184cebc15e5e3f13d04d9ffbc787a16018bd.tar.gz
gcc-0394184cebc15e5e3f13d04d9ffbc787a16018bd.tar.bz2
middle-end: Apply MASK_LEN_LOAD_LANES/MASK_LEN_STORE_LANES to ivopts/alias
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.
-rw-r--r--gcc/tree-ssa-alias.cc3
-rw-r--r--gcc/tree-ssa-loop-ivopts.cc4
2 files changed, 7 insertions, 0 deletions
diff --git a/gcc/tree-ssa-alias.cc b/gcc/tree-ssa-alias.cc
index cf38fe5..373940b 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 d208d9d..3d3f28f 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: