[Mlir-commits] [mlir] Add support for MLIR to llvm vscale attribute (PR #67012)

Tobias Gysi llvmlistbot at llvm.org
Thu Sep 21 07:12:53 PDT 2023


================
@@ -2342,6 +2342,19 @@ ParseResult LLVMFuncOp::parse(OpAsmParser &parser, OperationState &result) {
   result.addAttribute(getFunctionTypeAttrName(result.name),
                       TypeAttr::get(type));
 
+  if (succeeded(parser.parseOptionalKeyword("vscale_range"))) {
+    int64_t minRange, maxRange;
+    if (parser.parseLParen() || parser.parseInteger(minRange) ||
+        parser.parseComma() || parser.parseInteger(maxRange) ||
+        parser.parseRParen())
+      return failure();
+    auto intTy = mlir::IntegerType::get(parser.getContext(), 32);
----------------
gysit wrote:

```suggestion
    auto intTy = IntegerType::get(parser.getContext(), 32);
```
The mlir namespace should not be necessary here and below.

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


More information about the Mlir-commits mailing list