From: Kazu Hirata Date: Mon, 20 Feb 2023 07:35:39 +0000 (-0800) Subject: [llvm] Use APInt::isAllOnes instead of isAllOnesValue (NFC) X-Git-Tag: upstream/17.0.6~16999 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=397265d88f2200220f6b98f320826f7d5fc3d038;p=platform%2Fupstream%2Fllvm.git [llvm] Use APInt::isAllOnes instead of isAllOnesValue (NFC) Note that isAllOnesValue has been soft-deprecated in favor of isAllOnes. --- diff --git a/llvm/lib/CodeGen/SelectionDAG/TargetLowering.cpp b/llvm/lib/CodeGen/SelectionDAG/TargetLowering.cpp index c3a4699..6d972f4 100644 --- a/llvm/lib/CodeGen/SelectionDAG/TargetLowering.cpp +++ b/llvm/lib/CodeGen/SelectionDAG/TargetLowering.cpp @@ -1768,7 +1768,7 @@ bool TargetLowering::SimplifyDemandedBits( Known.Zero.setLowBits(ShAmt); // Attempt to avoid multi-use ops if we don't need anything from them. - if (!InDemandedMask.isAllOnesValue() || !DemandedElts.isAllOnesValue()) { + if (!InDemandedMask.isAllOnes() || !DemandedElts.isAllOnes()) { SDValue DemandedOp0 = SimplifyMultipleUseDemandedBits( Op0, InDemandedMask, DemandedElts, TLO.DAG, Depth + 1); if (DemandedOp0) { @@ -1873,7 +1873,7 @@ bool TargetLowering::SimplifyDemandedBits( Known.Zero.setHighBits(ShAmt); // Attempt to avoid multi-use ops if we don't need anything from them. - if (!InDemandedMask.isAllOnesValue() || !DemandedElts.isAllOnesValue()) { + if (!InDemandedMask.isAllOnes() || !DemandedElts.isAllOnes()) { SDValue DemandedOp0 = SimplifyMultipleUseDemandedBits( Op0, InDemandedMask, DemandedElts, TLO.DAG, Depth + 1); if (DemandedOp0) { diff --git a/llvm/lib/Target/ARM/ARMTargetTransformInfo.cpp b/llvm/lib/Target/ARM/ARMTargetTransformInfo.cpp index 53953ce..0467cc7 100644 --- a/llvm/lib/Target/ARM/ARMTargetTransformInfo.cpp +++ b/llvm/lib/Target/ARM/ARMTargetTransformInfo.cpp @@ -445,7 +445,7 @@ InstructionCost ARMTTIImpl::getIntImmCostInst(unsigned Opcode, unsigned Idx, return 0; // We can convert <= -1 to < 0, which is generally quite cheap. - if (Inst && Opcode == Instruction::ICmp && Idx == 1 && Imm.isAllOnesValue()) { + if (Inst && Opcode == Instruction::ICmp && Idx == 1 && Imm.isAllOnes()) { ICmpInst::Predicate Pred = cast(Inst)->getPredicate(); if (Pred == ICmpInst::ICMP_SGT || Pred == ICmpInst::ICMP_SLE) return std::min(getIntImmCost(Imm, Ty, CostKind),