X-Git-Url: http://plrg.eecs.uci.edu/git/?p=oota-llvm.git;a=blobdiff_plain;f=lib%2FTransforms%2FInstCombine%2FInstCombineVectorOps.cpp;fp=lib%2FTransforms%2FInstCombine%2FInstCombineVectorOps.cpp;h=b6beb65066806a615458ad5990cc2b846e4998b0;hp=ae2e8a33fbb079df261e8deb60559e3385a0d48c;hb=99b7898c2992b09c981cdccf5bc3acf4a5f064bf;hpb=9f6a4a5bb8c411998b74da7b4702fec803560ef3 diff --git a/lib/Transforms/InstCombine/InstCombineVectorOps.cpp b/lib/Transforms/InstCombine/InstCombineVectorOps.cpp index ae2e8a33fbb..b6beb650668 100644 --- a/lib/Transforms/InstCombine/InstCombineVectorOps.cpp +++ b/lib/Transforms/InstCombine/InstCombineVectorOps.cpp @@ -733,7 +733,8 @@ static Value *BuildNew(Instruction *I, ArrayRef NewOps) { case Instruction::GetElementPtr: { Value *Ptr = NewOps[0]; ArrayRef Idx = NewOps.slice(1); - GetElementPtrInst *GEP = GetElementPtrInst::Create(Ptr, Idx, "", I); + GetElementPtrInst *GEP = GetElementPtrInst::Create( + cast(I)->getSourceElementType(), Ptr, Idx, "", I); GEP->setIsInBounds(cast(I)->isInBounds()); return GEP; }