Fix MSVC "result of 32-bit shift implicitly converted to 64 bits" warning. NFCI.

This commit is contained in:
Simon Pilgrim 2020-02-03 11:08:48 +00:00
parent 46e5603c8a
commit ae5d3e8c51
1 changed files with 4 additions and 4 deletions

View File

@ -214,13 +214,13 @@ static APInt getVariantMatchScore(const VariantMatchInfo &VMI,
switch (getOpenMPContextTraitSelectorForProperty(Property)) {
case TraitSelector::device_kind:
Score += (1 << (NoConstructTraits + 0));
Score += (1ULL << (NoConstructTraits + 0));
continue;
case TraitSelector::device_arch:
Score += (1 << (NoConstructTraits + 1));
Score += (1ULL << (NoConstructTraits + 1));
continue;
case TraitSelector::device_isa:
Score += (1 << (NoConstructTraits + 2));
Score += (1ULL << (NoConstructTraits + 2));
continue;
default:
continue;
@ -236,7 +236,7 @@ static APInt getVariantMatchScore(const VariantMatchInfo &VMI,
"Ill-formed variant match info!");
(void)Property;
// ConstructMatches is the position p - 1 and we need 2^(p-1).
Score += (1 << ConstructMatches[ConstructIdx++]);
Score += (1ULL << ConstructMatches[ConstructIdx++]);
}
LLVM_DEBUG(dbgs() << "[" << DEBUG_TYPE << "] Variant has a score of " << Score