From 397265d88f2200220f6b98f320826f7d5fc3d038 Mon Sep 17 00:00:00 2001 From: Kazu Hirata Date: Sun, 19 Feb 2023 23:35:39 -0800 Subject: [PATCH] [llvm] Use APInt::isAllOnes instead of isAllOnesValue (NFC) Note that isAllOnesValue has been soft-deprecated in favor of isAllOnes. --- llvm/lib/CodeGen/SelectionDAG/TargetLowering.cpp | 4 ++-- llvm/lib/Target/ARM/ARMTargetTransformInfo.cpp | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) 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), -- 2.7.4