File tree Expand file tree Collapse file tree 1 file changed +5
-2
lines changed
mlir/lib/Dialect/Arith/IR Expand file tree Collapse file tree 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) {
15211521 if (auto extOp = getOperand ().getDefiningOp <arith::ExtFOp>()) {
15221522 Value src = extOp.getIn ();
15231523 auto srcType = cast<FloatType>(getElementTypeOrSelf (src.getType ()));
1524- auto intermediateType = cast<FloatType>(getElementTypeOrSelf (extOp.getType ()));
1524+ auto intermediateType =
1525+ cast<FloatType>(getElementTypeOrSelf (extOp.getType ()));
15251526 // 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 ())) {
15271530 // truncf(extf(a)) -> truncf(a)
15281531 if (srcType.getWidth () > resElemType.getWidth ()) {
15291532 setOperand (src);
You can’t perform that action at this time.
0 commit comments