diff options
author | Benjamin Kramer <benny.kra@googlemail.com> | 2012-03-02 15:34:35 +0000 |
---|---|---|
committer | Benjamin Kramer <benny.kra@googlemail.com> | 2012-03-02 15:34:35 +0000 |
commit | 0c7374d87e6bf002028cd19f8ae9547927c9c645 (patch) | |
tree | de047d1d4db49bda04daa0c955ed502696e53a56 /include/llvm | |
parent | 9b3b95fab736f7daea11cd0220af9148775466d4 (diff) | |
download | external_llvm-0c7374d87e6bf002028cd19f8ae9547927c9c645.zip external_llvm-0c7374d87e6bf002028cd19f8ae9547927c9c645.tar.gz external_llvm-0c7374d87e6bf002028cd19f8ae9547927c9c645.tar.bz2 |
Hashing: microoptimize a truncate on 64 bit away. This currently blocks dead code eliminating the conditional.
The optimizer should handle this eventually, but currently LVI isn't really designed for this kind of stuff.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@151918 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/llvm')
-rw-r--r-- | include/llvm/ADT/Hashing.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/include/llvm/ADT/Hashing.h b/include/llvm/ADT/Hashing.h index 2c270e4..120f9e5 100644 --- a/include/llvm/ADT/Hashing.h +++ b/include/llvm/ADT/Hashing.h @@ -173,7 +173,7 @@ static const uint64_t k3 = 0xc949d7c7509e6557ULL; /// \brief Bitwise right rotate. /// Normally this will compile to a single instruction, especially if the /// shift is a manifest constant. -inline uint64_t rotate(uint64_t val, unsigned shift) { +inline uint64_t rotate(uint64_t val, size_t shift) { // Avoid shifting by 64: doing so yields an undefined result. return shift == 0 ? val : ((val >> shift) | (val << (64 - shift))); } |