OSDN Git Service
(root)
/
android-x86
/
external-llvm.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
ecc4d60
)
[ConstantRange] Use APInt::getOneBitSet to shorten some code. NFC
author
Craig Topper
<craig.topper@gmail.com>
Sat, 29 Apr 2017 17:59:41 +0000
(17:59 +0000)
committer
Craig Topper
<craig.topper@gmail.com>
Sat, 29 Apr 2017 17:59:41 +0000
(17:59 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@301753
91177308
-0d34-0410-b5e6-
96231b3b80d8
lib/IR/ConstantRange.cpp
patch
|
blob
|
history
diff --git
a/lib/IR/ConstantRange.cpp
b/lib/IR/ConstantRange.cpp
index
8b595a6
..
4d7e73e
100644
(file)
--- a/
lib/IR/ConstantRange.cpp
+++ b/
lib/IR/ConstantRange.cpp
@@
-243,11
+243,8
@@
bool ConstantRange::isSignWrappedSet() const {
}
APInt ConstantRange::getSetSize() const {
- if (isFullSet()) {
- APInt Size(getBitWidth()+1, 0);
- Size.setBit(getBitWidth());
- return Size;
- }
+ if (isFullSet())
+ return APInt::getOneBitSet(getBitWidth()+1, getBitWidth());
// This is also correct for wrapped sets.
return (Upper - Lower).zext(getBitWidth()+1);