projects
/
oota-llvm.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
[opaque pointer type] more gep API migrations
[oota-llvm.git]
/
lib
/
Transforms
/
InstCombine
/
InstCombineVectorOps.cpp
diff --git
a/lib/Transforms/InstCombine/InstCombineVectorOps.cpp
b/lib/Transforms/InstCombine/InstCombineVectorOps.cpp
index ae2e8a33fbb079df261e8deb60559e3385a0d48c..b6beb65066806a615458ad5990cc2b846e4998b0 100644
(file)
--- a/
lib/Transforms/InstCombine/InstCombineVectorOps.cpp
+++ b/
lib/Transforms/InstCombine/InstCombineVectorOps.cpp
@@
-733,7
+733,8
@@
static Value *BuildNew(Instruction *I, ArrayRef<Value*> NewOps) {
case Instruction::GetElementPtr: {
Value *Ptr = NewOps[0];
ArrayRef<Value*> Idx = NewOps.slice(1);
case Instruction::GetElementPtr: {
Value *Ptr = NewOps[0];
ArrayRef<Value*> Idx = NewOps.slice(1);
- GetElementPtrInst *GEP = GetElementPtrInst::Create(Ptr, Idx, "", I);
+ GetElementPtrInst *GEP = GetElementPtrInst::Create(
+ cast<GetElementPtrInst>(I)->getSourceElementType(), Ptr, Idx, "", I);
GEP->setIsInBounds(cast<GetElementPtrInst>(I)->isInBounds());
return GEP;
}
GEP->setIsInBounds(cast<GetElementPtrInst>(I)->isInBounds());
return GEP;
}