aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKazu Hirata <kazu@google.com>2023-02-19 22:54:23 -0800
committerKazu Hirata <kazu@google.com>2023-02-19 22:54:23 -0800
commitb7ffd9686ddf6bc4d8006f76acd55ac0a43a8ec7 (patch)
tree3baa6d209b8e0330cdfdf0892371b93ff0010a37
parent4a05edd410a42cffc4be574d1fcc5c345db204e8 (diff)
downloadllvm-b7ffd9686ddf6bc4d8006f76acd55ac0a43a8ec7.zip
llvm-b7ffd9686ddf6bc4d8006f76acd55ac0a43a8ec7.tar.gz
llvm-b7ffd9686ddf6bc4d8006f76acd55ac0a43a8ec7.tar.bz2
Use APInt::getAllOnes instead of APInt::getAllOnesValue (NFC)
Note that getAllOnesValue has been soft-deprecated in favor of getAllOnes.
-rw-r--r--llvm/lib/CodeGen/GlobalISel/LegalizerHelper.cpp2
-rw-r--r--llvm/lib/CodeGen/SelectionDAG/TargetLowering.cpp2
-rw-r--r--llvm/lib/Target/AArch64/AArch64ISelLowering.cpp4
-rw-r--r--mlir/lib/Conversion/SCFToOpenMP/SCFToOpenMP.cpp4
-rw-r--r--mlir/lib/Dialect/Arith/IR/InferIntRangeInterfaceImpls.cpp2
-rw-r--r--mlir/lib/Dialect/Index/IR/InferIntRangeInterfaceImpls.cpp2
6 files changed, 8 insertions, 8 deletions
diff --git a/llvm/lib/CodeGen/GlobalISel/LegalizerHelper.cpp b/llvm/lib/CodeGen/GlobalISel/LegalizerHelper.cpp
index ad3a88a..6d579c5 100644
--- a/llvm/lib/CodeGen/GlobalISel/LegalizerHelper.cpp
+++ b/llvm/lib/CodeGen/GlobalISel/LegalizerHelper.cpp
@@ -7374,7 +7374,7 @@ LegalizerHelper::lowerISFPCLASS(MachineInstr &MI) {
APInt AllOneMantissa = APFloat::getLargest(Semantics).bitcastToAPInt() & ~Inf;
APInt QNaNBitMask =
APInt::getOneBitSet(BitSize, AllOneMantissa.getActiveBits() - 1);
- APInt InvertionMask = APInt::getAllOnesValue(DstTy.getScalarSizeInBits());
+ APInt InvertionMask = APInt::getAllOnes(DstTy.getScalarSizeInBits());
auto SignBitC = MIRBuilder.buildConstant(IntTy, SignBit);
auto ValueMaskC = MIRBuilder.buildConstant(IntTy, ValueMask);
diff --git a/llvm/lib/CodeGen/SelectionDAG/TargetLowering.cpp b/llvm/lib/CodeGen/SelectionDAG/TargetLowering.cpp
index d5fae60..80b9774 100644
--- a/llvm/lib/CodeGen/SelectionDAG/TargetLowering.cpp
+++ b/llvm/lib/CodeGen/SelectionDAG/TargetLowering.cpp
@@ -8079,7 +8079,7 @@ SDValue TargetLowering::expandIS_FPCLASS(EVT ResultVT, SDValue Op,
APInt AllOneMantissa = APFloat::getLargest(Semantics).bitcastToAPInt() & ~Inf;
APInt QNaNBitMask =
APInt::getOneBitSet(BitSize, AllOneMantissa.getActiveBits() - 1);
- APInt InvertionMask = APInt::getAllOnesValue(ResultVT.getScalarSizeInBits());
+ APInt InvertionMask = APInt::getAllOnes(ResultVT.getScalarSizeInBits());
SDValue ValueMaskV = DAG.getConstant(ValueMask, DL, IntVT);
SDValue SignBitV = DAG.getConstant(SignBit, DL, IntVT);
diff --git a/llvm/lib/Target/AArch64/AArch64ISelLowering.cpp b/llvm/lib/Target/AArch64/AArch64ISelLowering.cpp
index 73a9c14..0e9f0be 100644
--- a/llvm/lib/Target/AArch64/AArch64ISelLowering.cpp
+++ b/llvm/lib/Target/AArch64/AArch64ISelLowering.cpp
@@ -4099,7 +4099,7 @@ AArch64TargetLowering::LowerVectorFP_TO_INT_SAT(SDValue Op,
Sat = DAG.getNode(ISD::SMAX, DL, IntVT, Min, MaxC);
} else {
SDValue MinC = DAG.getConstant(
- APInt::getAllOnesValue(SatWidth).zext(SrcElementWidth), DL, IntVT);
+ APInt::getAllOnes(SatWidth).zext(SrcElementWidth), DL, IntVT);
Sat = DAG.getNode(ISD::UMIN, DL, IntVT, NativeCvt, MinC);
}
@@ -4155,7 +4155,7 @@ SDValue AArch64TargetLowering::LowerFP_TO_INT_SAT(SDValue Op,
Sat = DAG.getNode(ISD::SMAX, DL, DstVT, Min, MaxC);
} else {
SDValue MinC = DAG.getConstant(
- APInt::getAllOnesValue(SatWidth).zext(DstWidth), DL, DstVT);
+ APInt::getAllOnes(SatWidth).zext(DstWidth), DL, DstVT);
Sat = DAG.getNode(ISD::UMIN, DL, DstVT, NativeCvt, MinC);
}
diff --git a/mlir/lib/Conversion/SCFToOpenMP/SCFToOpenMP.cpp b/mlir/lib/Conversion/SCFToOpenMP/SCFToOpenMP.cpp
index 8f3bad7..f843c3d 100644
--- a/mlir/lib/Conversion/SCFToOpenMP/SCFToOpenMP.cpp
+++ b/mlir/lib/Conversion/SCFToOpenMP/SCFToOpenMP.cpp
@@ -177,7 +177,7 @@ static Attribute minMaxValueForUnsignedInt(Type type, bool min) {
auto intType = type.cast<IntegerType>();
unsigned bitwidth = intType.getWidth();
return IntegerAttr::get(type, min ? llvm::APInt::getZero(bitwidth)
- : llvm::APInt::getAllOnesValue(bitwidth));
+ : llvm::APInt::getAllOnes(bitwidth));
}
/// Creates an OpenMP reduction declaration and inserts it into the provided
@@ -298,7 +298,7 @@ static omp::ReductionDeclareOp declareReduction(PatternRewriter &builder,
omp::ReductionDeclareOp decl = createDecl(
builder, symbolTable, reduce,
builder.getIntegerAttr(
- type, llvm::APInt::getAllOnesValue(type.getIntOrFloatBitWidth())));
+ type, llvm::APInt::getAllOnes(type.getIntOrFloatBitWidth())));
return addAtomicRMW(builder, LLVM::AtomicBinOp::_and, decl, reduce,
useOpaquePointers);
}
diff --git a/mlir/lib/Dialect/Arith/IR/InferIntRangeInterfaceImpls.cpp b/mlir/lib/Dialect/Arith/IR/InferIntRangeInterfaceImpls.cpp
index 179d088..16ff6dd 100644
--- a/mlir/lib/Dialect/Arith/IR/InferIntRangeInterfaceImpls.cpp
+++ b/mlir/lib/Dialect/Arith/IR/InferIntRangeInterfaceImpls.cpp
@@ -267,7 +267,7 @@ void arith::CmpIOp::inferResultRanges(ArrayRef<ConstantIntRanges> argRanges,
const ConstantIntRanges &lhs = argRanges[0], &rhs = argRanges[1];
APInt min = APInt::getZero(1);
- APInt max = APInt::getAllOnesValue(1);
+ APInt max = APInt::getAllOnes(1);
std::optional<bool> truthValue = intrange::evaluatePred(pred, lhs, rhs);
if (truthValue.has_value() && *truthValue)
diff --git a/mlir/lib/Dialect/Index/IR/InferIntRangeInterfaceImpls.cpp b/mlir/lib/Dialect/Index/IR/InferIntRangeInterfaceImpls.cpp
index 0c2ee71..b6b8a13 100644
--- a/mlir/lib/Dialect/Index/IR/InferIntRangeInterfaceImpls.cpp
+++ b/mlir/lib/Dialect/Index/IR/InferIntRangeInterfaceImpls.cpp
@@ -221,7 +221,7 @@ void CmpOp::inferResultRanges(ArrayRef<ConstantIntRanges> argRanges,
const ConstantIntRanges &lhs = argRanges[0], &rhs = argRanges[1];
APInt min = APInt::getZero(1);
- APInt max = APInt::getAllOnesValue(1);
+ APInt max = APInt::getAllOnes(1);
std::optional<bool> truthValue64 = intrange::evaluatePred(pred, lhs, rhs);