@@ -538,17 +538,16 @@ struct ClampClampOptimization : public OpRewritePattern<tosa::ClampOp> {
538
538
return failure ();
539
539
540
540
if (tosa::ClampOp clampOp = dyn_cast<tosa::ClampOp>(definingOp)) {
541
- auto min_fp = std::max (op.min_fp (), clampOp.min_fp ()).convertToFloat ();
542
- auto max_fp = std::min (op.max_fp (), clampOp.max_fp ()).convertToFloat ();
541
+ auto minFp = std::max (op.min_fp (), clampOp.min_fp ()).convertToFloat ();
542
+ auto maxFp = std::min (op.max_fp (), clampOp.max_fp ()).convertToFloat ();
543
543
544
- auto min_int = std::max (op.min_int (), clampOp.min_int ());
545
- auto max_int = std::min (op.max_int (), clampOp.max_int ());
544
+ auto minInt = std::max (op.min_int (), clampOp.min_int ());
545
+ auto maxInt = std::min (op.max_int (), clampOp.max_int ());
546
546
547
547
rewriter.replaceOpWithNewOp <tosa::ClampOp>(
548
- op, op.getType (), clampOp.input (),
549
- rewriter.getI64IntegerAttr (min_int),
550
- rewriter.getI64IntegerAttr (max_int), rewriter.getF32FloatAttr (min_fp),
551
- rewriter.getF32FloatAttr (max_fp));
548
+ op, op.getType (), clampOp.input (), rewriter.getI64IntegerAttr (minInt),
549
+ rewriter.getI64IntegerAttr (maxInt), rewriter.getF32FloatAttr (minFp),
550
+ rewriter.getF32FloatAttr (maxFp));
552
551
return success ();
553
552
}
554
553
0 commit comments