SSA ALIAS: Apply LEN_MASK_STORE to 'ref_maybe_used_by_call_p_1'

Message ID 20230623141539.4165425-1-juzhe.zhong@rivai.ai
State Accepted
Headers
Series SSA ALIAS: Apply LEN_MASK_STORE to 'ref_maybe_used_by_call_p_1' |

Checks

Context Check Description
snail/gcc-patch-check success Github commit url

Commit Message

juzhe.zhong@rivai.ai June 23, 2023, 2:15 p.m. UTC
  From: Ju-Zhe Zhong <juzhe.zhong@rivai.ai>

gcc/ChangeLog:

        * tree-ssa-alias.cc (call_may_clobber_ref_p_1): Add LEN_MASK_STORE.

---
 gcc/tree-ssa-alias.cc | 1 +
 1 file changed, 1 insertion(+)
  

Comments

Jeff Law June 23, 2023, 4:27 p.m. UTC | #1
On 6/23/23 08:15, juzhe.zhong@rivai.ai wrote:
> From: Ju-Zhe Zhong <juzhe.zhong@rivai.ai>
> 
> gcc/ChangeLog:
> 
>          * tree-ssa-alias.cc (call_may_clobber_ref_p_1): Add LEN_MASK_STORE.
Doesn't this need to extract/compute the size argument in a manner 
similar to what DSE does?

Jeff
  
juzhe.zhong@rivai.ai June 23, 2023, 11:20 p.m. UTC | #2
Not sure since I saw MASK_STORE/LEN_STORE didn't compute size.
 



juzhe.zhong@rivai.ai
 
From: Jeff Law
Date: 2023-06-24 00:27
To: juzhe.zhong; gcc-patches
CC: rguenther; richard.sandiford
Subject: Re: [PATCH] SSA ALIAS: Apply LEN_MASK_STORE to 'ref_maybe_used_by_call_p_1'
 
 
On 6/23/23 08:15, juzhe.zhong@rivai.ai wrote:
> From: Ju-Zhe Zhong <juzhe.zhong@rivai.ai>
> 
> gcc/ChangeLog:
> 
>          * tree-ssa-alias.cc (call_may_clobber_ref_p_1): Add LEN_MASK_STORE.
Doesn't this need to extract/compute the size argument in a manner 
similar to what DSE does?
 
Jeff
  
Jeff Law June 24, 2023, 2:12 p.m. UTC | #3
On 6/23/23 17:20, 钟居哲 wrote:
> Not sure since I saw MASK_STORE/LEN_STORE didn't compute size.
Also OK after a re-review on my part.  The code sets the size to -1 
after doing the ao_ref_init_from_ptr_and_size, meaning it's not a known 
size.

jeff
  

Patch

diff --git a/gcc/tree-ssa-alias.cc b/gcc/tree-ssa-alias.cc
index 92dc1bb9987..f31fd042c2a 100644
--- a/gcc/tree-ssa-alias.cc
+++ b/gcc/tree-ssa-alias.cc
@@ -3070,6 +3070,7 @@  call_may_clobber_ref_p_1 (gcall *call, ao_ref *ref, bool tbaa_p)
 	return false;
       case IFN_MASK_STORE:
       case IFN_LEN_STORE:
+      case IFN_LEN_MASK_STORE:
       case IFN_MASK_STORE_LANES:
 	{
 	  tree rhs = gimple_call_arg (call,