forked from OSchip/llvm-project
[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
This commit is contained in:
parent
3d354081e0
commit
a796580903
|
@ -3749,8 +3749,9 @@ SDValue DAGTypeLegalizer::WidenVecOp_Convert(SDNode *N) {
|
||||||
InVT.getVectorNumElements());
|
InVT.getVectorNumElements());
|
||||||
if (TLI.isTypeLegal(WideVT)) {
|
if (TLI.isTypeLegal(WideVT)) {
|
||||||
SDValue Res = DAG.getNode(Opcode, dl, WideVT, InOp);
|
SDValue Res = DAG.getNode(Opcode, dl, WideVT, InOp);
|
||||||
return DAG.getNode(ISD::EXTRACT_SUBVECTOR, dl, VT, Res,
|
return DAG.getNode(
|
||||||
DAG.getIntPtrConstant(0, dl));
|
ISD::EXTRACT_SUBVECTOR, dl, VT, Res,
|
||||||
|
DAG.getConstant(0, dl, TLI.getVectorIdxTy(DAG.getDataLayout())));
|
||||||
}
|
}
|
||||||
|
|
||||||
EVT InEltVT = InVT.getVectorElementType();
|
EVT InEltVT = InVT.getVectorElementType();
|
||||||
|
|
Loading…
Reference in New Issue