summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Analysis/ConstantFolding.cpp
diff options
context:
space:
mode:
authorDan Gohman <gohman@apple.com>2010-06-18 14:22:04 +0000
committerDan Gohman <gohman@apple.com>2010-06-18 14:22:04 +0000
commitf1d8304fe31b7f840bd63a6d173587998ca877b8 (patch)
tree79a18454925de7b467ce2c477fdb5a0011b33f6f /llvm/lib/Analysis/ConstantFolding.cpp
parent35b6f9a92944931204ef01153fe9c0145a6c5a90 (diff)
downloadbcm5719-llvm-f1d8304fe31b7f840bd63a6d173587998ca877b8.tar.gz
bcm5719-llvm-f1d8304fe31b7f840bd63a6d173587998ca877b8.zip
Eliminate unnecessary uses of getZExtValue().
llvm-svn: 106279
Diffstat (limited to 'llvm/lib/Analysis/ConstantFolding.cpp')
-rw-r--r--llvm/lib/Analysis/ConstantFolding.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/lib/Analysis/ConstantFolding.cpp b/llvm/lib/Analysis/ConstantFolding.cpp
index 37cda022102..1f4538ab937 100644
--- a/llvm/lib/Analysis/ConstantFolding.cpp
+++ b/llvm/lib/Analysis/ConstantFolding.cpp
@@ -208,7 +208,7 @@ static bool IsConstantOffsetFromGlobal(Constant *C, GlobalValue *&GV,
i != e; ++i, ++GTI) {
ConstantInt *CI = dyn_cast<ConstantInt>(*i);
if (!CI) return false; // Index isn't a simple constant?
- if (CI->getZExtValue() == 0) continue; // Not adding anything.
+ if (CI->isZero()) continue; // Not adding anything.
if (const StructType *ST = dyn_cast<StructType>(*GTI)) {
// N = N + Offset
OpenPOWER on IntegriCloud