[PATCH] D31924: SROA: Allow eliminating addrspacecasted allocas

Keno Fischer via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sun May 14 15:20:17 PDT 2017


loladiro added a comment.

Was there a decision reached here on what the correct semantics are? There are other places in LLVM (I found one in instcombine - there may be others) which do make the assumption that this change is proposing to introduce to the langref. Personally, I don't think this transformation should be allowed. I know there are architectures where different address spaces have different GEP behavior (though I'm not sure if this is the case for any in-tree backend). Nevertheless, if people do feel like this should be allowed (e.g. because such architectures should use something other than addrspacecast to convert between such address spaces), that's fine with me as well, but I think there should a clear statement in the langref on way or the other. As is, different people read the langref differently.


https://reviews.llvm.org/D31924





More information about the llvm-commits mailing list