aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/Analysis/MemoryBuiltins.cpp
diff options
context:
space:
mode:
authorEdward O'Callaghan <eocallaghan@auroraux.org>2009-11-02 03:14:31 +0000
committerEdward O'Callaghan <eocallaghan@auroraux.org>2009-11-02 03:14:31 +0000
commit0cc7777ce807460da12d40cbed99438caaf16c68 (patch)
treeee15e63808528f368fd6a62d71fbd1f5b68feb06 /llvm/lib/Analysis/MemoryBuiltins.cpp
parent7ccf1a6df610ac05f8c8757284ab9ab5e6afe23d (diff)
downloadllvm-0cc7777ce807460da12d40cbed99438caaf16c68.zip
llvm-0cc7777ce807460da12d40cbed99438caaf16c68.tar.gz
llvm-0cc7777ce807460da12d40cbed99438caaf16c68.tar.bz2
Fix for warning seen on DF-BSD, Victor, please fix this to use a shift instead of pow()
llvm-svn: 85781
Diffstat (limited to 'llvm/lib/Analysis/MemoryBuiltins.cpp')
-rw-r--r--llvm/lib/Analysis/MemoryBuiltins.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/lib/Analysis/MemoryBuiltins.cpp b/llvm/lib/Analysis/MemoryBuiltins.cpp
index f3b94c2..4ebfa96 100644
--- a/llvm/lib/Analysis/MemoryBuiltins.cpp
+++ b/llvm/lib/Analysis/MemoryBuiltins.cpp
@@ -158,7 +158,7 @@ static Value* isArrayMallocHelper(const CallInst *CI, LLVMContext &Context,
if (Opcode == Instruction::Shl) {
ConstantInt* Op1Int = dyn_cast<ConstantInt>(Op1);
if (!Op1Int) return NULL;
- Value* Op1Pow = ConstantInt::get(Op1->getType(),
+ Value* Op1Pow = ConstantInt::get(Op1->getType(), (uint64_t)
pow(2.0, (double) Op1Int->getZExtValue()));
if (Op0 == ElementSize || (FoldedElementSize && Op0 == FoldedElementSize))
// ArraySize << log2(ElementSize)