aboutsummaryrefslogtreecommitdiff
path: root/gcc/tree-ssa-loop-ivopts.c
diff options
context:
space:
mode:
authorKewen Lin <linkw@linux.ibm.com>2020-07-23 04:27:50 -0500
committerKewen Lin <linkw@linux.ibm.com>2020-07-23 07:40:09 -0500
commitead2be56f0e1d60ffcc519efb33c1ca7b78c23ba (patch)
tree1e2636f89fd9c957197bd37b4cdec6060b60bab1 /gcc/tree-ssa-loop-ivopts.c
parent3eb72737a215843e25603378ae1f9e2ea9a4c9ae (diff)
downloadgcc-ead2be56f0e1d60ffcc519efb33c1ca7b78c23ba.zip
gcc-ead2be56f0e1d60ffcc519efb33c1ca7b78c23ba.tar.gz
gcc-ead2be56f0e1d60ffcc519efb33c1ca7b78c23ba.tar.bz2
ivopts: Handle vector with length IFNs
This patch is to handle vector with length internal functions IFN_LEN_LOAD and IFN_LEN_STORE in IVOPTS. gcc/ChangeLog: * tree-ssa-loop-ivopts.c (get_mem_type_for_internal_fn): Handle IFN_LEN_LOAD and IFN_LEN_STORE. (get_alias_ptr_type_for_ptr_address): Likewise.
Diffstat (limited to 'gcc/tree-ssa-loop-ivopts.c')
-rw-r--r--gcc/tree-ssa-loop-ivopts.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/gcc/tree-ssa-loop-ivopts.c b/gcc/tree-ssa-loop-ivopts.c
index 1d2697a..45b3164 100644
--- a/gcc/tree-ssa-loop-ivopts.c
+++ b/gcc/tree-ssa-loop-ivopts.c
@@ -2436,12 +2436,14 @@ get_mem_type_for_internal_fn (gcall *call, tree *op_p)
{
case IFN_MASK_LOAD:
case IFN_MASK_LOAD_LANES:
+ case IFN_LEN_LOAD:
if (op_p == gimple_call_arg_ptr (call, 0))
return TREE_TYPE (gimple_call_lhs (call));
return NULL_TREE;
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;
@@ -7415,6 +7417,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_LEN_LOAD:
+ case IFN_LEN_STORE:
/* The second argument contains the correct alias type. */
gcc_assert (use->op_p = gimple_call_arg_ptr (call, 0));
return TREE_TYPE (gimple_call_arg (call, 1));