Fix deprecation warnings for `isOneValue` and `getAllOnesValue` (#1928)

The functions `isOneValue` and `getAllOnesValues` are
deprecated. `isOne` and `getAllOnes` should be used instead.
pull/1931/head
Ramiro Leal-Cavazos 2023-03-10 09:50:56 -08:00 committed by GitHub
parent 327deb90cd
commit 2be48c3a67
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 2 deletions

View File

@ -1065,7 +1065,7 @@ static Value createLinalgPayloadCalculationForElementwiseOp(
Value allOnesVal = b.create<arith::ConstantOp>( Value allOnesVal = b.create<arith::ConstantOp>(
loc, b.getIntegerAttr( loc, b.getIntegerAttr(
elementType, elementType,
APSInt::getAllOnesValue(elementType.getIntOrFloatBitWidth()))); APSInt::getAllOnes(elementType.getIntOrFloatBitWidth())));
return b.create<arith::XOrIOp>(loc, payloadArgs[0], allOnesVal); return b.create<arith::XOrIOp>(loc, payloadArgs[0], allOnesVal);
} }

View File

@ -390,7 +390,7 @@ void PrimIfOp::getSuccessorRegions(std::optional<unsigned> index,
// If the condition is constant, we can give a more precise answer. // If the condition is constant, we can give a more precise answer.
if (auto condAttr = operands.front().dyn_cast_or_null<IntegerAttr>()) { if (auto condAttr = operands.front().dyn_cast_or_null<IntegerAttr>()) {
Region *executedRegion = Region *executedRegion =
condAttr.getValue().isOneValue() ? &getThenRegion() : &getElseRegion(); condAttr.getValue().isOne() ? &getThenRegion() : &getElseRegion();
regions.push_back(RegionSuccessor(executedRegion)); regions.push_back(RegionSuccessor(executedRegion));
return; return;
} }