diff --git a/enzyme/Enzyme/MLIR/Implementations/Common.td b/enzyme/Enzyme/MLIR/Implementations/Common.td index 099e614b8bcd..34f44944af40 100644 --- a/enzyme/Enzyme/MLIR/Implementations/Common.td +++ b/enzyme/Enzyme/MLIR/Implementations/Common.td @@ -80,9 +80,10 @@ class GlobalExpr : Operation : Operation { +class Inst : Operation { string name = mnemonic; string dialect = dialect_; + string postop = postop_; } def Op { diff --git a/enzyme/tools/enzyme-tblgen/enzyme-tblgen.cpp b/enzyme/tools/enzyme-tblgen/enzyme-tblgen.cpp index 485af7868a70..fc47183b548f 100644 --- a/enzyme/tools/enzyme-tblgen/enzyme-tblgen.cpp +++ b/enzyme/tools/enzyme-tblgen/enzyme-tblgen.cpp @@ -922,6 +922,10 @@ bool handle(const Twine &curIndent, const Twine &argPattern, raw_ostream &os, if (isCall || isIntr) os << "})"; os << ")"; + if (intrinsic == MLIRDerivatives) { + auto postop = Def->getValueAsString("postop"); + os << postop; + } if (isCall) { os << ")"; }