diff options
| author | Simon Pilgrim <llvm-dev@redking.me.uk> | 2018-07-17 09:39:55 +0000 |
|---|---|---|
| committer | Simon Pilgrim <llvm-dev@redking.me.uk> | 2018-07-17 09:39:55 +0000 |
| commit | a0220b0570f8825d8cbe36930756502491c0e31b (patch) | |
| tree | 9894a775880b89f620b9142aa5a2e08c0581791a /llvm/lib | |
| parent | 448ef7793d549fdbc5350f0c1a43c13ab7c6ac07 (diff) | |
| download | bcm5719-llvm-a0220b0570f8825d8cbe36930756502491c0e31b.tar.gz bcm5719-llvm-a0220b0570f8825d8cbe36930756502491c0e31b.zip | |
Fix MSVC "result of 32-bit shift implicitly converted to 64 bits" warning. NFCI.
llvm-svn: 337257
Diffstat (limited to 'llvm/lib')
| -rw-r--r-- | llvm/lib/Transforms/InstCombine/InstCombineCompares.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/llvm/lib/Transforms/InstCombine/InstCombineCompares.cpp b/llvm/lib/Transforms/InstCombine/InstCombineCompares.cpp index d50dfa75552..d67a9793e4f 100644 --- a/llvm/lib/Transforms/InstCombine/InstCombineCompares.cpp +++ b/llvm/lib/Transforms/InstCombine/InstCombineCompares.cpp @@ -2999,8 +2999,8 @@ foldICmpWithTruncSignExtendedVal(ICmpInst &I, const uint64_t XBitWidth = C0->getBitWidth(); const uint64_t KeptBits = XBitWidth - MaskedBits; - const uint64_t ICmpCst = 1UL << KeptBits; // (1 << KeptBits) - const uint64_t AddCst = ICmpCst >> 1UL; // (1 << (KeptBits-1)) + const uint64_t ICmpCst = (uint64_t)1 << KeptBits; // (1 << KeptBits) + const uint64_t AddCst = ICmpCst >> 1; // (1 << (KeptBits-1)) auto *XType = X->getType(); // (add %x, (1 << (KeptBits-1))) |

