diff options
author | Ayman Musa <ayman.musa@intel.com> | 2016-08-17 07:52:15 +0000 |
---|---|---|
committer | Ayman Musa <ayman.musa@intel.com> | 2016-08-17 07:52:15 +0000 |
commit | 71b43c5c1da23235c3d9dfeedcaa1fa2edd5959d (patch) | |
tree | c45f66c0909fdbf9f4ac7320b870e5efe00fc30c /llvm/lib/CodeGen/SelectionDAG | |
parent | 5f6d73b1fa782d6ecf495242040471d828b2fbed (diff) | |
download | bcm5719-llvm-71b43c5c1da23235c3d9dfeedcaa1fa2edd5959d.tar.gz bcm5719-llvm-71b43c5c1da23235c3d9dfeedcaa1fa2edd5959d.zip |
Fix bug in DAGBuilder for getelementptr with expanded vector.
Replacing the usage of MVT with EVT in case the vector type is expanded.
Differential Revision: https://reviews.llvm.org/D23306
llvm-svn: 278913
Diffstat (limited to 'llvm/lib/CodeGen/SelectionDAG')
-rw-r--r-- | llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp b/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp index b68b74e9ac9..4ba31cd3a9e 100644 --- a/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp +++ b/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp @@ -3329,8 +3329,9 @@ void SelectionDAGBuilder::visitGetElementPtr(const User &I) { if (CI->isZero()) continue; APInt Offs = ElementSize * CI->getValue().sextOrTrunc(PtrSize); + LLVMContext &Context = *DAG.getContext(); SDValue OffsVal = VectorWidth ? - DAG.getConstant(Offs, dl, MVT::getVectorVT(PtrTy, VectorWidth)) : + DAG.getConstant(Offs, dl, EVT::getVectorVT(Context, PtrTy, VectorWidth)) : DAG.getConstant(Offs, dl, PtrTy); // In an inbouds GEP with an offset that is nonnegative even when |