summaryrefslogtreecommitdiffstats
path: root/llvm
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2005-08-03 01:04:40 +0000
committerChris Lattner <sabre@nondot.org>2005-08-03 01:04:40 +0000
commitdfc20bf2dd9ea1d3fbfd2f4f849974ae8ae99b1d (patch)
tree0610054d88a332bc2eeee38886e165685ba37bce /llvm
parent2dbf1960ff49cf68cd1aaa7a6308a61b9aecbd88 (diff)
downloadbcm5719-llvm-dfc20bf2dd9ea1d3fbfd2f4f849974ae8ae99b1d.tar.gz
bcm5719-llvm-dfc20bf2dd9ea1d3fbfd2f4f849974ae8ae99b1d.zip
Fix another bug in the clz patch that caused miscompilations when !gcc4
llvm-svn: 22616
Diffstat (limited to 'llvm')
-rw-r--r--llvm/include/llvm/Support/MathExtras.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/llvm/include/llvm/Support/MathExtras.h b/llvm/include/llvm/Support/MathExtras.h
index 6cd44682fc0..8e7ad58efd0 100644
--- a/llvm/include/llvm/Support/MathExtras.h
+++ b/llvm/include/llvm/Support/MathExtras.h
@@ -142,12 +142,12 @@ inline unsigned CountLeadingZeros_64(uint64_t Value) {
// if some bits in hi portion
if (Hi) {
// leading zeros in hi portion plus all bits in lo portion
- Count = CountLeadingZeros_32(Hi) + 32;
+ Count = CountLeadingZeros_32(Hi);
} else {
// get lo portion
unsigned Lo = Lo_32(Value);
// same as 32 bit value
- Count = CountLeadingZeros_32(Lo);
+ Count = CountLeadingZeros_32(Lo)+32;
}
}
#endif
OpenPOWER on IntegriCloud