diff --git a/mlir/lib/IR/AsmPrinter.cpp b/mlir/lib/IR/AsmPrinter.cpp --- a/mlir/lib/IR/AsmPrinter.cpp +++ b/mlir/lib/IR/AsmPrinter.cpp @@ -923,8 +923,7 @@ }; } // namespace -SSANameState::SSANameState( - Operation *op, const OpPrintingFlags &printerFlags) +SSANameState::SSANameState(Operation *op, const OpPrintingFlags &printerFlags) : printerFlags(printerFlags) { llvm::SaveAndRestore valueIDSaver(nextValueID); llvm::SaveAndRestore argumentIDSaver(nextArgumentID); @@ -2711,7 +2710,11 @@ // Check to see if this is a known operation. If so, use the registered // custom printer hook. if (auto opInfo = op->getRegisteredInfo()) { - opInfo->printAssembly(op, *this, defaultDialectStack.back()); + StringRef name = op->getName().getStringRef(); + if (llvm::count(name, '.') > 1) + opInfo->printAssembly(op, *this, ""); + else + opInfo->printAssembly(op, *this, defaultDialectStack.back()); return; } // Otherwise try to dispatch to the dialect, if available.