1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2025-01-31 20:51:52 +01:00

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

The shift of 1 by an amount that is never more than 31 means that the warning is a false positive but is safe and fixes Werror builds.
This commit is contained in:
Simon Pilgrim 2020-04-02 12:01:47 +01:00
parent 402e566b58
commit f3f5e6c3a7

View File

@ -9430,7 +9430,7 @@ MaybeAlign SelectionDAG::InferPtrAlign(SDValue Ptr) const {
llvm::computeKnownBits(GV, Known, getDataLayout());
unsigned AlignBits = Known.countMinTrailingZeros();
if (AlignBits)
return commonAlignment(Align(1 << std::min(31U, AlignBits)), GVOffset);
return commonAlignment(Align(1ull << std::min(31U, AlignBits)), GVOffset);
}
// If this is a direct reference to a stack slot, use information about the