summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Support/ConstantRange.cpp
diff options
context:
space:
mode:
authorDan Gohman <gohman@apple.com>2010-01-26 15:56:18 +0000
committerDan Gohman <gohman@apple.com>2010-01-26 15:56:18 +0000
commit3f8ed9e1ae80f25d538d1baa46f5e89c3e72b8f6 (patch)
tree4891cb3761cc324da730584b5d45b342562c62a5 /llvm/lib/Support/ConstantRange.cpp
parent8e66b8eb2049de430d47450e5031c0e0f2e82a67 (diff)
downloadbcm5719-llvm-3f8ed9e1ae80f25d538d1baa46f5e89c3e72b8f6.tar.gz
bcm5719-llvm-3f8ed9e1ae80f25d538d1baa46f5e89c3e72b8f6.zip
Fix a typo that several people pointed out. Also, address the case of
wrapping that Duncan pointed out. llvm-svn: 94547
Diffstat (limited to 'llvm/lib/Support/ConstantRange.cpp')
-rw-r--r--llvm/lib/Support/ConstantRange.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/llvm/lib/Support/ConstantRange.cpp b/llvm/lib/Support/ConstantRange.cpp
index e9ddffc06ba..2746f7aaaa5 100644
--- a/llvm/lib/Support/ConstantRange.cpp
+++ b/llvm/lib/Support/ConstantRange.cpp
@@ -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);
OpenPOWER on IntegriCloud