Fix for warning seen on DF-BSD, Victor, please fix this to use a shift instead of pow()
llvm-svn: 85781
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 @@
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)