[PATCH] D68515: [PATCH 31/38] [noalias] SROA/PromoteMemoryToRegister: Learn how to handle noalias intrinsics

Jeroen Dobbelaere via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Feb 12 09:47:07 PST 2020


jeroen.dobbelaere added a comment.

In D68515#1871020 <https://reviews.llvm.org/D68515#1871020>, @alexey.zhikhar wrote:

>


[..]

> On platforms with 32-bit pointers, pointers might be treated as 32-bit integers, hence the bitcast. I attach an llvm-lit test case, hope it helps. F11327642: noalias-copyguard.ll <https://reviews.llvm.org/F11327642>
> 
> I don't think that we can emit an `llvm.noalias` intrinsic here since the pointer is treated as a integer, so maybe we should just bail.. What do you think?

Is the bitcast introduced by 'clang' (frontend), or was it introduced by one of the optimization passes ? In the latter case, which pass is this?  We should probably handle it and
treat it as a 'gep with all-0 indices'... And make sure that the pointer-type for the llvm.noalias is somewhat usable.

If it is based on 'a pointer to int' conversion in the c-language, then it should be ok to just ignore it.


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D68515/new/

https://reviews.llvm.org/D68515





More information about the llvm-commits mailing list