summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorDuncan Sands <baldrick@free.fr>2012-11-13 13:01:00 +0000
committerDuncan Sands <baldrick@free.fr>2012-11-13 13:01:00 +0000
commit707276d415002fb37ac3fbc50c66905a4ffe1f75 (patch)
treec17ac57a6cd9f983bbff023d3183fdadcf8bc4bf /include
parent2333e29be441d9d55920651e0b2add23ab0c1613 (diff)
downloadexternal_llvm-707276d415002fb37ac3fbc50c66905a4ffe1f75.zip
external_llvm-707276d415002fb37ac3fbc50c66905a4ffe1f75.tar.gz
external_llvm-707276d415002fb37ac3fbc50c66905a4ffe1f75.tar.bz2
Fix the instcombine GEP index widening transform to work correctly for vector
getelementptrs. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@167829 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include')
-rw-r--r--include/llvm/Support/GetElementPtrTypeIterator.h8
1 files changed, 4 insertions, 4 deletions
diff --git a/include/llvm/Support/GetElementPtrTypeIterator.h b/include/llvm/Support/GetElementPtrTypeIterator.h
index ef92c95..93dc41f 100644
--- a/include/llvm/Support/GetElementPtrTypeIterator.h
+++ b/include/llvm/Support/GetElementPtrTypeIterator.h
@@ -83,15 +83,15 @@ namespace llvm {
typedef generic_gep_type_iterator<> gep_type_iterator;
inline gep_type_iterator gep_type_begin(const User *GEP) {
- return gep_type_iterator::begin(GEP->getOperand(0)->getType(),
- GEP->op_begin()+1);
+ return gep_type_iterator::begin
+ (GEP->getOperand(0)->getType()->getScalarType(), GEP->op_begin()+1);
}
inline gep_type_iterator gep_type_end(const User *GEP) {
return gep_type_iterator::end(GEP->op_end());
}
inline gep_type_iterator gep_type_begin(const User &GEP) {
- return gep_type_iterator::begin(GEP.getOperand(0)->getType(),
- GEP.op_begin()+1);
+ return gep_type_iterator::begin
+ (GEP.getOperand(0)->getType()->getScalarType(), GEP.op_begin()+1);
}
inline gep_type_iterator gep_type_end(const User &GEP) {
return gep_type_iterator::end(GEP.op_end());