[llvm-commits] CVS: llvm/lib/Target/Alpha/AlphaISelPattern.cpp

Chris Lattner lattner at cs.uiuc.edu
Tue Aug 2 12:25:16 PDT 2005



Changes in directory llvm/lib/Target/Alpha:

AlphaISelPattern.cpp updated: 1.157 -> 1.158
---
Log message:

Update to use the new MathExtras.h support for log2 computation.
Patch contributed by Jim Laskey!



---
Diffs of the changes:  (+0 -14)

 AlphaISelPattern.cpp |   14 --------------
 1 files changed, 14 deletions(-)


Index: llvm/lib/Target/Alpha/AlphaISelPattern.cpp
diff -u llvm/lib/Target/Alpha/AlphaISelPattern.cpp:1.157 llvm/lib/Target/Alpha/AlphaISelPattern.cpp:1.158
--- llvm/lib/Target/Alpha/AlphaISelPattern.cpp:1.157	Mon Aug  1 12:47:28 2005
+++ llvm/lib/Target/Alpha/AlphaISelPattern.cpp	Tue Aug  2 14:25:03 2005
@@ -801,20 +801,6 @@
   return Q;
 }
 
-//From PPC32
-/// ExactLog2 - This function solves for (Val == 1 << (N-1)) and returns N.  It
-/// returns zero when the input is not exactly a power of two.
-static unsigned ExactLog2(uint64_t Val) {
-  if (Val == 0 || (Val & (Val-1))) return 0;
-  unsigned Count = 0;
-  while (Val != 1) {
-    Val >>= 1;
-    ++Count;
-  }
-  return Count;
-}
-
-
 //These describe LDAx
 static const int IMM_LOW  = -32768;
 static const int IMM_HIGH = 32767;






More information about the llvm-commits mailing list