[llvm-commits] [llvm] r75366 - in /llvm/trunk: include/llvm/Support/ConstantRange.h lib/Support/ConstantRange.cpp

Nick Lewycky nicholas at mxc.ca
Sat Jul 11 10:04:03 PDT 2009


Author: nicholas
Date: Sat Jul 11 12:04:01 2009
New Revision: 75366

URL: http://llvm.org/viewvc/llvm-project?rev=75366&view=rev
Log:
Clarify and simplify.

Modified:
    llvm/trunk/include/llvm/Support/ConstantRange.h
    llvm/trunk/lib/Support/ConstantRange.cpp

Modified: llvm/trunk/include/llvm/Support/ConstantRange.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Support/ConstantRange.h?rev=75366&r1=75365&r2=75366&view=diff

==============================================================================
--- llvm/trunk/include/llvm/Support/ConstantRange.h (original)
+++ llvm/trunk/include/llvm/Support/ConstantRange.h Sat Jul 11 12:04:01 2009
@@ -58,9 +58,9 @@
   /// assert out if the two APInt's are not the same bit width.
   ConstantRange(const APInt& Lower, const APInt& Upper);
 
-  /// makeICmpRegion - Return the range of values that a value must be within
-  /// in order for the comparison specified by the predicate against range
-  /// Other to be true.
+  /// makeICmpRegion - Produce the smallest range that contains all values that
+  /// might satisfy the comparison specified by Pred when compared to any value
+  /// contained within Other.
   static ConstantRange makeICmpRegion(unsigned Pred,
                                       const ConstantRange &Other);
 

Modified: llvm/trunk/lib/Support/ConstantRange.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Support/ConstantRange.cpp?rev=75366&r1=75365&r2=75366&view=diff

==============================================================================
--- llvm/trunk/lib/Support/ConstantRange.cpp (original)
+++ llvm/trunk/lib/Support/ConstantRange.cpp Sat Jul 11 12:04:01 2009
@@ -53,7 +53,7 @@
   switch (Pred) {
     default: assert(!"Invalid ICmp predicate to makeICmpRegion()");
     case ICmpInst::ICMP_EQ:
-      return ConstantRange(CR.getLower(), CR.getUpper());
+      return CR;
     case ICmpInst::ICMP_NE:
       if (CR.isSingleElement())
         return ConstantRange(CR.getUpper(), CR.getLower());





More information about the llvm-commits mailing list