File tree 1 file changed +5
-2
lines changed
mlir/lib/Dialect/Arith/IR
1 file changed +5
-2
lines changed Original file line number Diff line number Diff line change @@ -1521,9 +1521,12 @@ OpFoldResult arith::TruncFOp::fold(FoldAdaptor adaptor) {
1521
1521
if (auto extOp = getOperand ().getDefiningOp <arith::ExtFOp>()) {
1522
1522
Value src = extOp.getIn ();
1523
1523
auto srcType = cast<FloatType>(getElementTypeOrSelf (src.getType ()));
1524
- auto intermediateType = cast<FloatType>(getElementTypeOrSelf (extOp.getType ()));
1524
+ auto intermediateType =
1525
+ cast<FloatType>(getElementTypeOrSelf (extOp.getType ()));
1525
1526
// Check if the srcType is representable in the intermediateType
1526
- if (llvm::APFloatBase::isRepresentableBy (srcType.getFloatSemantics (), intermediateType.getFloatSemantics ())) {
1527
+ if (llvm::APFloatBase::isRepresentableBy (
1528
+ srcType.getFloatSemantics (),
1529
+ intermediateType.getFloatSemantics ())) {
1527
1530
// truncf(extf(a)) -> truncf(a)
1528
1531
if (srcType.getWidth () > resElemType.getWidth ()) {
1529
1532
setOperand (src);
You can’t perform that action at this time.
0 commit comments