summaryrefslogtreecommitdiffstats
path: root/llvm/include
diff options
context:
space:
mode:
authorBenjamin Kramer <benny.kra@googlemail.com>2012-03-02 15:34:35 +0000
committerBenjamin Kramer <benny.kra@googlemail.com>2012-03-02 15:34:35 +0000
commit053384edef757c5fdc7c8d496f1e5b50238ac2df (patch)
tree8c1e1470899cce4b6019849d4ab9737a4378332c /llvm/include
parent55d5208eaef890f3eec2f30ceaff68952f6456d1 (diff)
downloadbcm5719-llvm-053384edef757c5fdc7c8d496f1e5b50238ac2df.tar.gz
bcm5719-llvm-053384edef757c5fdc7c8d496f1e5b50238ac2df.zip
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. llvm-svn: 151918
Diffstat (limited to 'llvm/include')
-rw-r--r--llvm/include/llvm/ADT/Hashing.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/include/llvm/ADT/Hashing.h b/llvm/include/llvm/ADT/Hashing.h
index 2c270e4ffc5..120f9e56994 100644
--- a/llvm/include/llvm/ADT/Hashing.h
+++ b/llvm/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)));
}
OpenPOWER on IntegriCloud