Fix MSVC "result of 32-bit shift implicitly converted to 64 bits" warning. NFC.
authorSimon Pilgrim <llvm-dev@redking.me.uk>
Wed, 17 May 2023 11:31:03 +0000 (12:31 +0100)
committerSimon Pilgrim <llvm-dev@redking.me.uk>
Wed, 17 May 2023 11:31:18 +0000 (12:31 +0100)
llvm/lib/Analysis/ScalarEvolution.cpp

index 5f9b506..504c94f 100644 (file)
@@ -8339,8 +8339,8 @@ unsigned ScalarEvolution::getSmallConstantTripMultiple(const Loop *L,
   // If a trip multiple is huge (>=2^32), the trip count is still divisible by
   // the greatest power of 2 divisor less than 2^32.
   return Multiple.getActiveBits() > 32
-             ? 1U << std::min((uint32_t)31, Multiple.countTrailingZeros())
-             : Multiple.zextOrTrunc(32).getZExtValue();
+             ? 1U << std::min((unsigned)31, Multiple.countTrailingZeros())
+             : (unsigned)Multiple.zextOrTrunc(32).getZExtValue();
 }
 
 /// Returns the largest constant divisor of the trip count of this loop as a