diff options
author | Craig Topper <craig.topper@intel.com> | 2018-10-12 22:55:17 +0000 |
---|---|---|
committer | Craig Topper <craig.topper@intel.com> | 2018-10-12 22:55:17 +0000 |
commit | a796580903a6cb3a52533fdb054bebceacada83a (patch) | |
tree | a43c68f8b670a2e7be0b3b943562c30c09c5459d /llvm/lib/CodeGen | |
parent | 3d354081e04702565dad7cab8f72f1c0d5a49529 (diff) | |
download | bcm5719-llvm-a796580903a6cb3a52533fdb054bebceacada83a.tar.gz bcm5719-llvm-a796580903a6cb3a52533fdb054bebceacada83a.zip |
[LegalizeVectorTypes] Use TLI.getVectorIdxTy instead of DAG.getIntPtrConstant.
There's no guarantee that vector indices should use pointer types. So use the correct query method.
llvm-svn: 344428
Diffstat (limited to 'llvm/lib/CodeGen')
-rw-r--r-- | llvm/lib/CodeGen/SelectionDAG/LegalizeVectorTypes.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/llvm/lib/CodeGen/SelectionDAG/LegalizeVectorTypes.cpp b/llvm/lib/CodeGen/SelectionDAG/LegalizeVectorTypes.cpp index f4cad796863..a08a41ccaf2 100644 --- a/llvm/lib/CodeGen/SelectionDAG/LegalizeVectorTypes.cpp +++ b/llvm/lib/CodeGen/SelectionDAG/LegalizeVectorTypes.cpp @@ -3749,8 +3749,9 @@ SDValue DAGTypeLegalizer::WidenVecOp_Convert(SDNode *N) { InVT.getVectorNumElements()); if (TLI.isTypeLegal(WideVT)) { SDValue Res = DAG.getNode(Opcode, dl, WideVT, InOp); - return DAG.getNode(ISD::EXTRACT_SUBVECTOR, dl, VT, Res, - DAG.getIntPtrConstant(0, dl)); + return DAG.getNode( + ISD::EXTRACT_SUBVECTOR, dl, VT, Res, + DAG.getConstant(0, dl, TLI.getVectorIdxTy(DAG.getDataLayout()))); } EVT InEltVT = InVT.getVectorElementType(); |