diff --git a/mlir/lib/Quantizer/Configurations/FxpMathConfig.cpp b/mlir/lib/Quantizer/Configurations/FxpMathConfig.cpp index 8623df92c298..d512c4d827b9 100644 --- a/mlir/lib/Quantizer/Configurations/FxpMathConfig.cpp +++ b/mlir/lib/Quantizer/Configurations/FxpMathConfig.cpp @@ -96,9 +96,8 @@ struct FxpMathTargetConfigImpl : public FxpMathTargetConfig { bool isHandledType(Type t) const final { if (t.isa()) return true; - auto shapedType = t.dyn_cast(); - return (shapedType && shapedType.getElementType().isa() && - (t.isa() || t.isa())); + return (t.isa() || t.isa()) && + t.cast().getElementType().isa(); } void finalizeAnchors(CAGSlice &cag) const override {