diff options
author | Dan Gohman <gohman@apple.com> | 2010-06-18 14:22:04 +0000 |
---|---|---|
committer | Dan Gohman <gohman@apple.com> | 2010-06-18 14:22:04 +0000 |
commit | f1d8304fe31b7f840bd63a6d173587998ca877b8 (patch) | |
tree | 79a18454925de7b467ce2c477fdb5a0011b33f6f /llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp | |
parent | 35b6f9a92944931204ef01153fe9c0145a6c5a90 (diff) | |
download | bcm5719-llvm-f1d8304fe31b7f840bd63a6d173587998ca877b8.tar.gz bcm5719-llvm-f1d8304fe31b7f840bd63a6d173587998ca877b8.zip |
Eliminate unnecessary uses of getZExtValue().
llvm-svn: 106279
Diffstat (limited to 'llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp')
-rw-r--r-- | llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp b/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp index 833173f2440..f43c4e4e7e4 100644 --- a/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp +++ b/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp @@ -2734,7 +2734,7 @@ void SelectionDAGBuilder::visitGetElementPtr(const User &I) { // If this is a constant subscript, handle it quickly. if (const ConstantInt *CI = dyn_cast<ConstantInt>(Idx)) { - if (CI->getZExtValue() == 0) continue; + if (CI->isZero()) continue; uint64_t Offs = TD->getTypeAllocSize(Ty)*cast<ConstantInt>(CI)->getSExtValue(); SDValue OffsVal; @@ -4367,7 +4367,7 @@ SelectionDAGBuilder::visitIntrinsicCall(const CallInst &I, unsigned Intrinsic) { SDValue Arg = getValue(I.getOperand(0)); EVT Ty = Arg.getValueType(); - if (CI->getZExtValue() == 0) + if (CI->isZero()) Res = DAG.getConstant(-1ULL, Ty); else Res = DAG.getConstant(0, Ty); |