Handle bug exposed by power benchmark
authorChris Lattner <sabre@nondot.org>
Thu, 3 Oct 2002 21:06:38 +0000 (21:06 +0000)
committerChris Lattner <sabre@nondot.org>
Thu, 3 Oct 2002 21:06:38 +0000 (21:06 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4033 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Analysis/DataStructure/DataStructure.cpp

index 08ae687bfd3400ad1a799483218ffc698d236cd6..f50c8ea6cfb793e75c09fce0c6393cd9a05c8445 100644 (file)
@@ -48,7 +48,7 @@ DSNode::DSNode(enum NodeTy NT, const Type *T) : NodeType(NT) {
       // Because of this, find the biggest power of two that is bigger than
       // multiple to use as our real Multiple.
       unsigned RealMultiple = 2;
-      while (RealMultiple < Multiple) RealMultiple <<= 1;
+      while (RealMultiple <= Multiple) RealMultiple <<= 1;
 
       unsigned RealBound = MergeMap.size()/RealMultiple;
       assert(RealBound <= 128 && "Math didn't work out right");