diff options
author | Ju-Zhe Zhong <juzhe.zhong@rivai.ai> | 2023-06-24 07:41:57 +0800 |
---|---|---|
committer | Pan Li <pan2.li@intel.com> | 2023-06-24 21:08:12 +0800 |
commit | 31b7659995caccca626709ecb634339f75980ff2 (patch) | |
tree | 1c8dc294b74e594ded593e7d1d57a9408b4547d9 /gcc | |
parent | ad5ab848cc487b3f7fd82c7cb3c408747bd10422 (diff) | |
download | gcc-31b7659995caccca626709ecb634339f75980ff2.zip gcc-31b7659995caccca626709ecb634339f75980ff2.tar.gz gcc-31b7659995caccca626709ecb634339f75980ff2.tar.bz2 |
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}.
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/tree-ssa-loop-ivopts.cc | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/gcc/tree-ssa-loop-ivopts.cc b/gcc/tree-ssa-loop-ivopts.cc index 5731822..243ce86 100644 --- a/gcc/tree-ssa-loop-ivopts.cc +++ b/gcc/tree-ssa-loop-ivopts.cc @@ -2442,6 +2442,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; @@ -2449,9 +2450,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; |