[llvm] r213863 - Fixing an MSVC conversion warning about implicitly converting the shift results to 64-bits. No functional change intended.

Aaron Ballman aaron at aaronballman.com
Thu Jul 24 07:24:59 PDT 2014


Author: aaronballman
Date: Thu Jul 24 09:24:59 2014
New Revision: 213863

URL: http://llvm.org/viewvc/llvm-project?rev=213863&view=rev
Log:
Fixing an MSVC conversion warning about implicitly converting the shift results to 64-bits. No functional change intended.

Modified:
    llvm/trunk/lib/Transforms/Utils/SimplifyCFG.cpp

Modified: llvm/trunk/lib/Transforms/Utils/SimplifyCFG.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/Utils/SimplifyCFG.cpp?rev=213863&r1=213862&r2=213863&view=diff
==============================================================================
--- llvm/trunk/lib/Transforms/Utils/SimplifyCFG.cpp (original)
+++ llvm/trunk/lib/Transforms/Utils/SimplifyCFG.cpp Thu Jul 24 09:24:59 2014
@@ -3627,7 +3627,7 @@ Value *SwitchLookupTable::BuildLookup(Va
     case ArrayKind: {
       // Make sure the table index will not overflow when treated as signed.
       if (IntegerType *IT = dyn_cast<IntegerType>(Index->getType()))
-        if (TableSize > (1 << (IT->getBitWidth() - 1)))
+        if (TableSize > (1ULL << (IT->getBitWidth() - 1)))
           Index = Builder.CreateZExt(Index,
                                      IntegerType::get(IT->getContext(),
                                                       IT->getBitWidth() + 1),





More information about the llvm-commits mailing list