diff mbox series

[6/7] ivopts: Add handlings for vector with length IFNs

Message ID 794d261f-68c3-8e4e-7535-7b460089c95b@linux.ibm.com
State New
Headers show
Series Support vector load/store with length | expand

Commit Message

Kewen.Lin May 26, 2020, 5:58 a.m. UTC
gcc/ChangeLog

2020-MM-DD  Kewen Lin  <linkw@gcc.gnu.org>

	* 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.
---
 gcc/tree-ssa-loop-ivopts.c | 4 ++++
 1 file changed, 4 insertions(+)

--

Comments

Richard Sandiford July 22, 2020, 12:51 p.m. UTC | #1
"Kewen.Lin via Gcc-patches" <gcc-patches@gcc.gnu.org> writes:
> gcc/ChangeLog
>
> 2020-MM-DD  Kewen Lin  <linkw@gcc.gnu.org>
>
> 	* 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.

OK, thanks.

(Sorry, hadn't realised that this was still awaiting review.)

Richard
>
>
> ---
>  gcc/tree-ssa-loop-ivopts.c | 4 ++++
>  1 file changed, 4 insertions(+)
>
> diff --git a/gcc/tree-ssa-loop-ivopts.c b/gcc/tree-ssa-loop-ivopts.c
> index 1d2697ae1ba..45b31640e75 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));
diff mbox series

Patch

diff --git a/gcc/tree-ssa-loop-ivopts.c b/gcc/tree-ssa-loop-ivopts.c
index 1d2697ae1ba..45b31640e75 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));