[llvm-commits] CVS: llvm/include/llvm/Support/MathExtras.h

Chris Lattner lattner at cs.uiuc.edu
Tue Aug 2 18:04:51 PDT 2005



Changes in directory llvm/include/llvm/Support:

MathExtras.h updated: 1.20 -> 1.21
---
Log message:

Fix another bug in the clz patch that caused miscompilations when !gcc4


---
Diffs of the changes:  (+2 -2)

 MathExtras.h |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)


Index: llvm/include/llvm/Support/MathExtras.h
diff -u llvm/include/llvm/Support/MathExtras.h:1.20 llvm/include/llvm/Support/MathExtras.h:1.21
--- llvm/include/llvm/Support/MathExtras.h:1.20	Tue Aug  2 15:21:33 2005
+++ llvm/include/llvm/Support/MathExtras.h	Tue Aug  2 20:04:40 2005
@@ -142,12 +142,12 @@
     // 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






More information about the llvm-commits mailing list