This is an archive of the discontinued LLVM Phabricator instance.

CodeGen: Fix pointer info and index type when splitting vector
ClosedPublic

Authored by yaxunl on Nov 7 2017, 9:16 AM.

Details

Reviewers
arsenm
rampitec
Summary

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.

  1. 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.

Diff Detail

Event Timeline

yaxunl created this revision.Nov 7 2017, 9:16 AM
This revision is now accepted and ready to land.Nov 15 2017, 11:49 AM
yaxunl closed this revision.Dec 2 2017, 2:15 PM