shiltian wrote: > > If the value to be analyzed is directly from addrspacecast, we take the > > source > > address space directly. > > I don't think this is valid in general. You are allow to speculatively > produce invalid addrspacecasts. For example: > > ``` > __generic int* g_ptr = ...; > __local int* l_ptr = (__local int*) g_ptr; > if (is_shared(g_ptr)) > *l_ptr = 1; > ```
That doesn't matter because the scope is the instruction. In your example here, the pointer of the store is already in the specific address space. That will not change no matter whether the branch is taken or not. `AAAddressSpace` doesn't say `g_ptr` is in what address space. It just changes the pointer operand of memory instruction. https://github.com/llvm/llvm-project/pull/108258 _______________________________________________ llvm-branch-commits mailing list llvm-branch-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits