Fix for warning seen on DF-BSD, Victor, please fix this to use a shift instead of...
[oota-llvm.git] / lib / Analysis / MemoryBuiltins.cpp
index f3b94c2da4ac0167c1cc3ec9833b836f6b8a3b07..4ebfa96642113fd767c46fd8dac08e3884e8e093 100644 (file)
@@ -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)