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

Manman Ren mren at apple.com
Thu Jul 24 10:43:07 PDT 2014


Thank you,

Manman

> On Jul 24, 2014, at 7:24 AM, Aaron Ballman <aaron at aaronballman.com> wrote:
> 
> 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),
> 
> 
> _______________________________________________
> llvm-commits mailing list
> llvm-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits




More information about the llvm-commits mailing list