mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-06-12 13:38:21 +00:00
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:
@ -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);
|
||||
|
Reference in New Issue
Block a user