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 | bcc946d7409ba0d8918f4d0256090ff1a8b90392 (patch) | |
| tree | 73508159acd14e76dc92313df355849ee75ec35d /lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp | |
| parent | 1c3b8d6192c8d27aecfbfed5eb46e2863c595aa4 (diff) | |
| download | external_llvm-bcc946d7409ba0d8918f4d0256090ff1a8b90392.zip external_llvm-bcc946d7409ba0d8918f4d0256090ff1a8b90392.tar.gz external_llvm-bcc946d7409ba0d8918f4d0256090ff1a8b90392.tar.bz2 | |
Eliminate unnecessary uses of getZExtValue().
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@106279 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp')
| -rw-r--r-- | lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp b/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp index 833173f..f43c4e4 100644 --- a/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp +++ b/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); |
