1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-26 04:32:44 +01:00

[SelectionDAG] Use TLI.getVectorIdxTy to determine type for an EXTRACT_VECTOR_ELT index instead of hardcoding MVT::i8.

llvm-svn: 320012
This commit is contained in:
Craig Topper 2017-12-07 08:04:33 +00:00
parent e9464f0f47
commit 4cdd4b2602

View File

@ -1754,7 +1754,8 @@ SDValue DAGTypeLegalizer::SplitVecOp_EXTRACT_VECTOR_ELT(SDNode *N) {
for (unsigned i = 0; i < VecVT.getVectorNumElements(); ++i) {
ElementOps.push_back(DAG.getAnyExtOrTrunc(
DAG.getNode(ISD::EXTRACT_VECTOR_ELT, dl, EltVT, Vec,
DAG.getConstant(i, dl, MVT::i8)),
DAG.getConstant(i, dl,
TLI.getVectorIdxTy(DAG.getDataLayout()))),
dl, MVT::i8));
}