git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@213863
91177308-0d34-0410-b5e6-
96231b3b80d8
case ArrayKind: {
// Make sure the table index will not overflow when treated as signed.
if (IntegerType *IT = dyn_cast<IntegerType>(Index->getType()))
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),
Index = Builder.CreateZExt(Index,
IntegerType::get(IT->getContext(),
IT->getBitWidth() + 1),