[PATCH] D39740: CodeGen: Fix pointer info and index type when splitting vector
Yaxun Liu via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Nov 7 09:17:01 PST 2017
yaxunl created this revision.
Herald added subscribers: nhaehnle, wdng, qcolombet.
Two issues found when doing codegen for splitting vector with non-zero alloca addr space:
1. DAGTypeLegalizer::SplitVecRes_INSERT_VECTOR_ELT uses dummy pointer info for creating
SDStore. Since one pointer operand contains multiply and add, InferPointerInfo is unable to
infer the correct pointer info, which ends up with a dummy pointer info for the target to lower
store and results in isel failure. The fix is to use more accurate pointer info.
2. TargetLowering::getVectorElementPointer uses value type of pointer in addr space 0 for
multiplication of index and then add it to the pointer. However the pointer may be in an addr
space which has different size than addr space 0. The fix is to use the pointer value type for
index multiplication.
https://reviews.llvm.org/D39740
Files:
lib/CodeGen/SelectionDAG/LegalizeVectorTypes.cpp
lib/CodeGen/SelectionDAG/TargetLowering.cpp
test/CodeGen/AMDGPU/insert_vector_elt.ll
test/CodeGen/AMDGPU/vgpr-spill-emergency-stack-slot-compute.ll
test/CodeGen/AMDGPU/vgpr-spill-emergency-stack-slot.ll
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D39740.121918.patch
Type: text/x-patch
Size: 7483 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20171107/a29cdb62/attachment.bin>
More information about the llvm-commits
mailing list