mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-10-20 19:42:54 +02: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:
parent
4372b58329
commit
e91c6a1a44
@ -158,7 +158,7 @@ static Value* isArrayMallocHelper(const CallInst *CI, LLVMContext &Context,
|
|||||||
if (Opcode == Instruction::Shl) {
|
if (Opcode == Instruction::Shl) {
|
||||||
ConstantInt* Op1Int = dyn_cast<ConstantInt>(Op1);
|
ConstantInt* Op1Int = dyn_cast<ConstantInt>(Op1);
|
||||||
if (!Op1Int) return NULL;
|
if (!Op1Int) return NULL;
|
||||||
Value* Op1Pow = ConstantInt::get(Op1->getType(),
|
Value* Op1Pow = ConstantInt::get(Op1->getType(), (uint64_t)
|
||||||
pow(2.0, (double) Op1Int->getZExtValue()));
|
pow(2.0, (double) Op1Int->getZExtValue()));
|
||||||
if (Op0 == ElementSize || (FoldedElementSize && Op0 == FoldedElementSize))
|
if (Op0 == ElementSize || (FoldedElementSize && Op0 == FoldedElementSize))
|
||||||
// ArraySize << log2(ElementSize)
|
// ArraySize << log2(ElementSize)
|
||||||
|
Loading…
Reference in New Issue
Block a user