mirror of https://github.com/llvm/circt.git
32 lines
1.2 KiB
MLIR
32 lines
1.2 KiB
MLIR
// RUN: circt-opt %s --verify-diagnostics | circt-opt | FileCheck %s
|
|
|
|
// CHECK-LABEL: func.func @Foo
|
|
func.func @Foo(%arg0: i32, %arg1: index, %arg2: f64) {
|
|
// CHECK-NEXT: dbg.variable "foo", %arg0 : i32
|
|
// CHECK-NEXT: dbg.variable "bar", %arg1 : index
|
|
// CHECK-NEXT: dbg.variable "baz", %arg2 : f64
|
|
dbg.variable "foo", %arg0 : i32
|
|
dbg.variable "bar", %arg1 : index
|
|
dbg.variable "baz", %arg2 : f64
|
|
|
|
// CHECK-NEXT: [[TMP:%.+]] = dbg.struct {"foo": %arg0, "bar": %arg1, "baz": %arg2} : i32, index, f64
|
|
// CHECK-NEXT: dbg.variable "megafoo", [[TMP]] : !dbg.struct
|
|
%0 = dbg.struct {"foo": %arg0, "bar": %arg1, "baz": %arg2} : i32, index, f64
|
|
dbg.variable "megafoo", %0 : !dbg.struct
|
|
|
|
// CHECK-NEXT: [[TMP:%.+]] = dbg.array [%arg1, %arg1] : index
|
|
// CHECK-NEXT: dbg.variable "megabar", [[TMP]] : !dbg.array
|
|
%1 = dbg.array [%arg1, %arg1] : index
|
|
dbg.variable "megabar", %1 : !dbg.array
|
|
|
|
// CHECK-NEXT: [[TMP:%.+]] = dbg.scope "inlined", "Bar"
|
|
// CHECK-NEXT: dbg.variable {{.+}} scope [[TMP]]
|
|
// CHECK-NEXT: dbg.scope {{.+}} scope [[TMP]]
|
|
%2 = dbg.scope "inlined", "Bar"
|
|
dbg.variable "x", %arg0 scope %2 : i32
|
|
dbg.scope "y", "Baz" scope %2
|
|
|
|
return
|
|
}
|
|
|