Skip to content

Commit 3c27005

Browse files
committed
Apply clang-tidy fixes for readability-identifier-naming in TosaToLinalg.cpp (NFC)
1 parent 6ed4310 commit 3c27005

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

mlir/lib/Conversion/TosaToLinalg/TosaToLinalg.cpp

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -365,16 +365,16 @@ createLinalgBodyCalculationForElementwiseOp(Operation *op, ValueRange args,
365365
// tosa::ClampOp
366366
if (isa<tosa::ClampOp>(op) && elementTy.isa<FloatType>()) {
367367
bool losesInfo = false;
368-
APFloat min_apf = op->getAttr("min_fp").cast<FloatAttr>().getValue();
369-
APFloat max_apf = op->getAttr("max_fp").cast<FloatAttr>().getValue();
370-
min_apf.convert(elementTy.cast<FloatType>().getFloatSemantics(),
371-
APFloat::rmNearestTiesToEven, &losesInfo);
372-
max_apf.convert(elementTy.cast<FloatType>().getFloatSemantics(),
373-
APFloat::rmNearestTiesToEven, &losesInfo);
368+
APFloat minApf = op->getAttr("min_fp").cast<FloatAttr>().getValue();
369+
APFloat maxApf = op->getAttr("max_fp").cast<FloatAttr>().getValue();
370+
minApf.convert(elementTy.cast<FloatType>().getFloatSemantics(),
371+
APFloat::rmNearestTiesToEven, &losesInfo);
372+
maxApf.convert(elementTy.cast<FloatType>().getFloatSemantics(),
373+
APFloat::rmNearestTiesToEven, &losesInfo);
374374
auto min = rewriter.create<arith::ConstantOp>(
375-
loc, elementTy, rewriter.getFloatAttr(elementTy, min_apf));
375+
loc, elementTy, rewriter.getFloatAttr(elementTy, minApf));
376376
auto max = rewriter.create<arith::ConstantOp>(
377-
loc, elementTy, rewriter.getFloatAttr(elementTy, max_apf));
377+
loc, elementTy, rewriter.getFloatAttr(elementTy, maxApf));
378378
return clampFloatHelper(loc, args[0], min, max, rewriter);
379379
}
380380

0 commit comments

Comments
 (0)