brintos

brintos / llvm-project-archived public Read only

0
0
Text · 1.4 KiB · d99806c Raw
65 lines · plain
1// RUN: mlir-opt -allow-unregistered-dialect %s -split-input-file -mlir-print-debuginfo -mlir-print-local-scope  | FileCheck %s2 3// CHECK: module {4module {5}6 7// -----8 9// CHECK: module attributes {foo.attr = true} {10module attributes {foo.attr = true} {11}12 13// -----14 15// CHECK: module {16module {17  // CHECK-NEXT: "foo.result_op"() : () -> i3218  %result = "foo.result_op"() : () -> i3219}20 21// -----22 23// Check that a top-level module is always created, with location info.24// CHECK: module {25// CHECK-NEXT: } loc({{.*}}module-op.mlir{{.*}})26 27// -----28 29// Check that the top-level module can be defined via a single module operation.30// CHECK: module {31// CHECK-NOT: module {32module {33}34 35// -----36 37// Check that the implicit top-level module is also a name scope for SSA38// values.  This should not crash.39// CHECK: module {40// CHECK: %{{.*}} = "op"41// CHECK: }42%0 = "op"() : () -> i3243 44// -----45 46// CHECK-LABEL: module @foo47// CHECK-NOT: attributes48module @foo {49  // CHECK: module50  module {51    // CHECK: module @bar attributes52    module @bar attributes {foo.bar} {53    }54  }55}56 57// -----58 59// expected-error@below {{expects at most one data layout attribute}}60// expected-note@below {{'test.another_attribute' is a data layout attribute}}61// expected-note@below {{'test.random_attribute' is a data layout attribute}}62module attributes { test.random_attribute = #dlti.dl_spec<>,63                    test.another_attribute = #dlti.dl_spec<>} {64}65