1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-25 12:12:47 +01:00

Fix for warning seen on DF-BSD, Victor, please fix this to use a shift instead of pow()

llvm-svn: 85781
This commit is contained in:
Edward O'Callaghan 2009-11-02 03:14:31 +00:00
parent 4372b58329
commit e91c6a1a44

View 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)