[Mlir-commits] [mlir] Upstream polynomial.ntt and polynomial.intt (PR #90992)

Oleksandr Alex Zinenko llvmlistbot at llvm.org
Sat May 4 13:51:53 PDT 2024


================
@@ -202,11 +202,30 @@ Attribute RingAttr::parse(AsmParser &parser, Type type) {
     polyAttr = attr;
   }
 
+  Polynomial poly = polyAttr.getPolynomial();
+  APInt root(coefficientModulusAttr.getValue().getBitWidth(), 0);
+  bool hasRoot = succeeded(parser.parseOptionalComma());
+  IntegerAttr rootAttr = nullptr;
+  if (hasRoot) {
+    if (failed(parser.parseKeyword("primitiveRoot")))
+      return {};
+
+    if (failed(parser.parseEqual()))
+      return {};
+
+    auto result = parser.parseInteger(root);
----------------
ftynse wrote:

Nit: expand auto.

https://github.com/llvm/llvm-project/pull/90992


More information about the Mlir-commits mailing list