summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Analysis/Expressions.cpp
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
commitc4d6aca02ef1378b64c595309d88a53011b5f6f8 (patch)
tree847fe9b1ee43264d1c39712cd72a40fa0af70902 /llvm/lib/Analysis/Expressions.cpp
parente06cbbbc7487088e2db9fc495e962f592386486a (diff)
downloadbcm5719-llvm-c4d6aca02ef1378b64c595309d88a53011b5f6f8.tar.gz
bcm5719-llvm-c4d6aca02ef1378b64c595309d88a53011b5f6f8.zip
Fix a bug when compiling 'shl ubyte * %var, ubyte 2'
llvm-svn: 295
Diffstat (limited to 'llvm/lib/Analysis/Expressions.cpp')
-rw-r--r--llvm/lib/Analysis/Expressions.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/llvm/lib/Analysis/Expressions.cpp b/llvm/lib/Analysis/Expressions.cpp
index 07fb8c4ff15..f7342963e62 100644
--- a/llvm/lib/Analysis/Expressions.cpp
+++ b/llvm/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
OpenPOWER on IntegriCloud