xref: /llvm-project/mlir/test/IR/parser_dialect_loading.mlir (revision 07c157a43534744bff8b9cf03a5ec8d19717ba72)
1// RUN: mlir-opt -allow-unregistered-dialect --split-input-file %s | FileCheck %s
2
3// This is a testing that a non-qualified attribute in a custom format
4// correctly preload the dialect before creating the attribute.
5#attr = #test.nested_polynomial<poly=<1 + x**2>>
6// CHECK-LABEL: @parse_correctly
7llvm.func @parse_correctly() {
8  test.containing_int_polynomial_attr #attr
9  llvm.return
10}
11
12// -----
13
14#attr2 = #test.nested_polynomial2<poly=<1 + x**2>>
15// CHECK-LABEL: @parse_correctly_2
16llvm.func @parse_correctly_2() {
17  test.containing_int_polynomial_attr2 #attr2
18  llvm.return
19}
20