aboutsummaryrefslogtreecommitdiffstats
path: root/lib/VMCore
diff options
context:
space:
mode:
authorSanjiv Gupta <sanjiv.gupta@microchip.com>2009-04-24 02:37:54 +0000
committerSanjiv Gupta <sanjiv.gupta@microchip.com>2009-04-24 02:37:54 +0000
commit7f712d8fd1bbbc6bed73f8861847115f76ca9f3f (patch)
tree132bd2093c206fa866bd472837015d5b6610ea6c /lib/VMCore
parentd4760a5133c4c5547d1656035cd5c32ec53f0b28 (diff)
downloadexternal_llvm-7f712d8fd1bbbc6bed73f8861847115f76ca9f3f.zip
external_llvm-7f712d8fd1bbbc6bed73f8861847115f76ca9f3f.tar.gz
external_llvm-7f712d8fd1bbbc6bed73f8861847115f76ca9f3f.tar.bz2
Allow i16 type indices to gep.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@69946 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/VMCore')
-rw-r--r--lib/VMCore/Type.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/VMCore/Type.cpp b/lib/VMCore/Type.cpp
index 7e6bbe5..c85395f 100644
--- a/lib/VMCore/Type.cpp
+++ b/lib/VMCore/Type.cpp
@@ -1411,7 +1411,8 @@ void PointerType::typeBecameConcrete(const DerivedType *AbsTy) {
bool SequentialType::indexValid(const Value *V) const {
if (const IntegerType *IT = dyn_cast<IntegerType>(V->getType()))
- return IT->getBitWidth() == 32 || IT->getBitWidth() == 64;
+ return IT->getBitWidth() == 16 || IT->getBitWidth() == 32 ||
+ IT->getBitWidth() == 64;
return false;
}