Eliminate unnecessary uses of getZExtValue().

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@106279 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Dan Gohman
2010-06-18 14:22:04 +00:00
parent 7720cb3823
commit e368b460a2
14 changed files with 22 additions and 21 deletions

View File

@@ -1082,6 +1082,7 @@ public:
uint64_t getZExtValue() const { return Value->getZExtValue(); }
int64_t getSExtValue() const { return Value->getSExtValue(); }
bool isOne() const { return Value->isOne(); }
bool isNullValue() const { return Value->isNullValue(); }
bool isAllOnesValue() const { return Value->isAllOnesValue(); }

View File

@@ -136,7 +136,7 @@ namespace llvm {
return cast<ConstantInt>(const_cast<Value*>(getOperand(5)));
}
bool isVolatile() const {
return getVolatileCst()->getZExtValue() != 0;
return !getVolatileCst()->isZero();
}
/// getDest - This is just like getRawDest, but it strips off any cast