[llvm-commits] [llvm] r85781 - /llvm/trunk/lib/Analysis/MemoryBuiltins.cpp

Edward O'Callaghan eocallaghan at auroraux.org
Sun Nov 1 19:14:31 PST 2009


Author: evocallaghan
Date: Sun Nov  1 21:14:31 2009
New Revision: 85781

URL: http://llvm.org/viewvc/llvm-project?rev=85781&view=rev
Log:
Fix for warning seen on DF-BSD, Victor, please fix this to use a shift instead of pow()

Modified:
    llvm/trunk/lib/Analysis/MemoryBuiltins.cpp

Modified: llvm/trunk/lib/Analysis/MemoryBuiltins.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Analysis/MemoryBuiltins.cpp?rev=85781&r1=85780&r2=85781&view=diff

==============================================================================
--- llvm/trunk/lib/Analysis/MemoryBuiltins.cpp (original)
+++ llvm/trunk/lib/Analysis/MemoryBuiltins.cpp Sun Nov  1 21:14:31 2009
@@ -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)





More information about the llvm-commits mailing list