aboutsummaryrefslogtreecommitdiffstats
path: root/lib/Analysis
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2001-07-25 22:47:32 +0000
committerChris Lattner <sabre@nondot.org>2001-07-25 22:47:32 +0000
commit793d67831675dcf56b7c9c8d992e361df8d636d0 (patch)
treedf28d395788d1ad360ba315d0de27544ff082ab9 /lib/Analysis
parent50f98f07021c982fdbe9d372ab8cf7530566f958 (diff)
downloadexternal_llvm-793d67831675dcf56b7c9c8d992e361df8d636d0.zip
external_llvm-793d67831675dcf56b7c9c8d992e361df8d636d0.tar.gz
external_llvm-793d67831675dcf56b7c9c8d992e361df8d636d0.tar.bz2
Fix a bug when compiling 'shl ubyte * %var, ubyte 2'
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@295 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Analysis')
-rw-r--r--lib/Analysis/Expressions.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/Analysis/Expressions.cpp b/lib/Analysis/Expressions.cpp
index 07fb8c4..f734296 100644
--- a/lib/Analysis/Expressions.cpp
+++ b/lib/Analysis/Expressions.cpp
@@ -62,6 +62,7 @@ static ConstPoolInt *getIntegralConstant(ConstantPool &CP, unsigned char V,
static ConstPoolInt *getUnsignedConstant(ConstantPool &CP, uint64_t V,
const Type *Ty) {
// FIXME: Lookup prexisting constant in table!
+ if (Ty->isPointerType()) Ty = Type::ULongTy;
ConstPoolInt *CPI;
CPI = Ty->isSigned() ? new ConstPoolSInt(Ty, V) : new ConstPoolUInt(Ty, V);
@@ -273,7 +274,7 @@ ExprType analysis::ClassifyExpression(Value *Expr) {
assert(CPV->getType()->isIntegral() && "Must have an integral type!");
return (ConstPoolInt*)CPV;
} // end case Instruction::Cast
- // TODO: Handle SUB (at least!)
+ // TODO: Handle SUB, SHR?
} // end switch