Skip to content

Commit e7b5116

Browse files
committed
Revert "Remove a can't-happen match failure"
This reverts commit 7c1b38b.
1 parent 7c1b38b commit e7b5116

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

mlir/lib/Dialect/Arith/Transforms/ExpandOps.cpp

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -657,7 +657,11 @@ struct ScalingExtFOpConverter : public OpRewritePattern<arith::ScalingExtFOp> {
657657
scaleOperand = b.create<arith::TruncFOp>(scaleTy, scaleOperand, nullptr,
658658
op.getFastmathAttr());
659659
}
660-
660+
if (!llvm::isa<Float8E8M0FNUType>(scaleETy)) {
661+
return rewriter.notifyMatchFailure(
662+
op, "scaling_extf is using scales of type which can not be converted "
663+
"to f8E8M0FNU");
664+
}
661665
Type resultTy = op.getType();
662666
// extf on scale will essentially create floating point number
663667
// of type resulTy that is 2^scale and will also propagate NaNs

0 commit comments

Comments
 (0)