[PATCH] D45228: AMDGPU/SI: Handle BitCast of GEP in promoting alloca to vector
Changpeng Fang via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Apr 26 14:10:37 PDT 2018
cfang added inline comments.
================
Comment at: lib/Target/AMDGPU/AMDGPUPromoteAlloca.cpp:340-341
+ }
+ case Instruction::BitCast: {
+ if (isa<GetElementPtrInst>(Used)) {
+ for (User *BCUser : Inst->users()) {
----------------
arsenm wrote:
> This shouldn't need to special case GEP users. You really want something like stripPointerCasts, but not one that looks through addrspacecast.
>
> Could use a test with 0 index GEPs which should show the same problem.
I could not understand this comment.
Here we are handling the case of load(bitcast(gep))!
We are checking the bitcase and collect the load. We will transfer to vector load later, which depends on the gep for the index.
So we have to have the gep, and collect the load/store.
https://reviews.llvm.org/D45228
More information about the llvm-commits
mailing list