[llvm-commits] [llvm] r94547 - /llvm/trunk/lib/Support/ConstantRange.cpp

Dan Gohman gohman at apple.com
Tue Jan 26 07:56:18 PST 2010


Author: djg
Date: Tue Jan 26 09:56:18 2010
New Revision: 94547

URL: http://llvm.org/viewvc/llvm-project?rev=94547&view=rev
Log:
Fix a typo that several people pointed out. Also, address the case of
wrapping that Duncan pointed out.

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

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

==============================================================================
--- llvm/trunk/lib/Support/ConstantRange.cpp (original)
+++ llvm/trunk/lib/Support/ConstantRange.cpp Tue Jan 26 09:56:18 2010
@@ -540,8 +540,10 @@
 
 ConstantRange
 ConstantRange::multiply(const ConstantRange &Other) const {
-  // TODO: If either operand is a single element, round the result min anx
-  // max value to the appropriate multiple of that element.
+  // TODO: If either operand is a single element and the multiply is known to
+  // be non-wrapping, round the result min and max value to the appropriate
+  // multiple of that element. If wrapping is possible, at least adjust the
+  // range according to the greatest power-of-two factor of the single element.
 
   if (isEmptySet() || Other.isEmptySet())
     return ConstantRange(getBitWidth(), /*isFullSet=*/false);





More information about the llvm-commits mailing list