summaryrefslogtreecommitdiffstats
path: root/llvm/lib
diff options
context:
space:
mode:
authorSimon Pilgrim <llvm-dev@redking.me.uk>2018-07-17 09:39:55 +0000
committerSimon Pilgrim <llvm-dev@redking.me.uk>2018-07-17 09:39:55 +0000
commita0220b0570f8825d8cbe36930756502491c0e31b (patch)
tree9894a775880b89f620b9142aa5a2e08c0581791a /llvm/lib
parent448ef7793d549fdbc5350f0c1a43c13ab7c6ac07 (diff)
downloadbcm5719-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.cpp4
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)))
OpenPOWER on IntegriCloud