[llvm] r320012 - [SelectionDAG] Use TLI.getVectorIdxTy to determine type for an EXTRACT_VECTOR_ELT index instead of hardcoding MVT::i8.
Craig Topper via llvm-commits
llvm-commits at lists.llvm.org
Thu Dec 7 00:04:33 PST 2017
Author: ctopper
Date: Thu Dec 7 00:04:33 2017
New Revision: 320012
URL: http://llvm.org/viewvc/llvm-project?rev=320012&view=rev
Log:
[SelectionDAG] Use TLI.getVectorIdxTy to determine type for an EXTRACT_VECTOR_ELT index instead of hardcoding MVT::i8.
Modified:
llvm/trunk/lib/CodeGen/SelectionDAG/LegalizeVectorTypes.cpp
Modified: llvm/trunk/lib/CodeGen/SelectionDAG/LegalizeVectorTypes.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/SelectionDAG/LegalizeVectorTypes.cpp?rev=320012&r1=320011&r2=320012&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/SelectionDAG/LegalizeVectorTypes.cpp (original)
+++ llvm/trunk/lib/CodeGen/SelectionDAG/LegalizeVectorTypes.cpp Thu Dec 7 00:04:33 2017
@@ -1754,7 +1754,8 @@ SDValue DAGTypeLegalizer::SplitVecOp_EXT
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));
}
More information about the llvm-commits
mailing list