Skip to content

Commit 5a7f04a

Browse files
committed
use CHECK DAG to ensure the sequential checking of each line
1 parent ac5101a commit 5a7f04a

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

test/Dialect/Calyx/emit.mlir

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -286,11 +286,13 @@ module attributes {calyx.entrypoint = "main"} {
286286
module attributes {calyx.entrypoint = "main"} {
287287
// CHECK: import "primitives/float/addFN.futil";
288288
calyx.component @main(%in0: i32, %clk: i1 {clk}, %reset: i1 {reset}, %go: i1 {go}) -> (%out0: i32, %done: i1 {done}) {
289-
// CHECK: std_addFN_0 = std_addFN(8, 24, 32);
289+
// CHECK-DAG: cst_0 = std_float_const(0, 32, 4.200000);
290290
%cst = calyx.constant @cst_0 <4.200000e+00 : f32> : i32
291291
%true = hw.constant true
292292
%false = hw.constant false
293+
// CHECK-DAG: addf_0_reg = std_reg(32);
293294
%addf_0_reg.in, %addf_0_reg.write_en, %addf_0_reg.clk, %addf_0_reg.reset, %addf_0_reg.out, %addf_0_reg.done = calyx.register @addf_0_reg : i32, i1, i1, i1, i32, i1
295+
// CHECK-DAG: std_addFN_0 = std_addFN(8, 24, 32);
294296
%std_addFN_0.clk, %std_addFN_0.reset, %std_addFN_0.go, %std_addFN_0.control, %std_addFN_0.subOp, %std_addFN_0.left, %std_addFN_0.right, %std_addFN_0.roundingMode, %std_addFN_0.out, %std_addFN_0.exceptionalFlags, %std_addFN_0.done = calyx.ieee754.add @std_addFN_0 : i1, i1, i1, i1, i1, i32, i32, i3, i32, i5, i1
295297
%ret_arg0_reg.in, %ret_arg0_reg.write_en, %ret_arg0_reg.clk, %ret_arg0_reg.reset, %ret_arg0_reg.out, %ret_arg0_reg.done = calyx.register @ret_arg0_reg : i32, i1, i1, i1, i32, i1
296298
calyx.wires {
@@ -338,9 +340,12 @@ module attributes {calyx.entrypoint = "main"} {
338340
module attributes {calyx.entrypoint = "main"} {
339341
// CHECK: import "primitives/float/mulFN.futil";
340342
calyx.component @main(%in0: i32, %clk: i1 {clk}, %reset: i1 {reset}, %go: i1 {go}) -> (%out0: i32, %done: i1 {done}) {
343+
// CHECK-DAG: cst_0 = std_float_const(0, 32, 4.200000);
341344
%cst = calyx.constant @cst_0 <4.200000e+00 : f32> : i32
342345
%true = hw.constant true
346+
// CHECK-DAG: mulf_0_reg = std_reg(32);
343347
%mulf_0_reg.in, %mulf_0_reg.write_en, %mulf_0_reg.clk, %mulf_0_reg.reset, %mulf_0_reg.out, %mulf_0_reg.done = calyx.register @mulf_0_reg : i32, i1, i1, i1, i32, i1
348+
// CHECK-DAG: std_mulFN_0 = std_mulFN(8, 24, 32);
344349
%std_mulFN_0.clk, %std_mulFN_0.reset, %std_mulFN_0.go, %std_mulFN_0.control, %std_mulFN_0.left, %std_mulFN_0.right, %std_mulFN_0.roundingMode, %std_mulFN_0.out, %std_mulFN_0.exceptionalFlags, %std_mulFN_0.done = calyx.ieee754.mul @std_mulFN_0 : i1, i1, i1, i1, i32, i32, i3, i32, i5, i1
345350
%ret_arg0_reg.in, %ret_arg0_reg.write_en, %ret_arg0_reg.clk, %ret_arg0_reg.reset, %ret_arg0_reg.out, %ret_arg0_reg.done = calyx.register @ret_arg0_reg : i32, i1, i1, i1, i32, i1
346351
calyx.wires {

0 commit comments

Comments
 (0)