diff options
author | Craig Topper <craig.topper@intel.com> | 2017-12-07 08:04:33 +0000 |
---|---|---|
committer | Craig Topper <craig.topper@intel.com> | 2017-12-07 08:04:33 +0000 |
commit | 26ed8d1263d3762f00095a3ff3d7f13887dd2728 (patch) | |
tree | 016b0f3295c90724f3ebdcefd37e85f5b5cfedf8 /llvm/lib/CodeGen | |
parent | c81f4538ecd9fae55dfdcfff02048a11d65d7758 (diff) | |
download | bcm5719-llvm-26ed8d1263d3762f00095a3ff3d7f13887dd2728.tar.gz bcm5719-llvm-26ed8d1263d3762f00095a3ff3d7f13887dd2728.zip |
[SelectionDAG] Use TLI.getVectorIdxTy to determine type for an EXTRACT_VECTOR_ELT index instead of hardcoding MVT::i8.
llvm-svn: 320012
Diffstat (limited to 'llvm/lib/CodeGen')
-rw-r--r-- | llvm/lib/CodeGen/SelectionDAG/LegalizeVectorTypes.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/llvm/lib/CodeGen/SelectionDAG/LegalizeVectorTypes.cpp b/llvm/lib/CodeGen/SelectionDAG/LegalizeVectorTypes.cpp index bded9817b06..b574c1ea8b5 100644 --- a/llvm/lib/CodeGen/SelectionDAG/LegalizeVectorTypes.cpp +++ b/llvm/lib/CodeGen/SelectionDAG/LegalizeVectorTypes.cpp @@ -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)); } |