Fix a typo that several people pointed out. Also, address the case of
authorDan Gohman <gohman@apple.com>
Tue, 26 Jan 2010 15:56:18 +0000 (15:56 +0000)
committerDan Gohman <gohman@apple.com>
Tue, 26 Jan 2010 15:56:18 +0000 (15:56 +0000)
wrapping that Duncan pointed out.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94547 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Support/ConstantRange.cpp

index e9ddffc06ba2caf5f08634c5b6db39ccd07d50f4..2746f7aaaa5e81328e1edc279b8e686b8b45e9c2 100644 (file)
@@ -540,8 +540,10 @@ ConstantRange::add(const ConstantRange &Other) const {
 
 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);