-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: Anton Korobeynikov <[email protected]>
- Loading branch information
Showing
10 changed files
with
155 additions
and
32 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
// RUN: p4mlir-translate --typeinference-only %s | FileCheck %s | ||
|
||
// CHECK-LABEL: p4hir.action @foo(%arg0: !p4hir.bit<16> {p4hir.dir = #p4hir<dir in>}, %arg1: !p4hir.ref<!p4hir.int<10>> {p4hir.dir = #p4hir<dir inout>}, %arg2: !p4hir.ref<!p4hir.bit<16>> {p4hir.dir = #p4hir<dir out>}, %arg3: !p4hir.bit<16> {p4hir.dir = #p4hir<dir undir>}) | ||
// CHECK: p4hir.return | ||
action foo(in bit<16> arg1, inout int<10> arg2, out bit<16> arg3, bit<16> arg4) { | ||
bit<16> x = arg1; | ||
arg3 = x; | ||
if (arg1 == arg4) { | ||
arg2 = arg2 + 1; | ||
} | ||
return; | ||
} | ||
|
||
// CHECK-LABEL: p4hir.action @bar(%arg0: !p4hir.bit<16> {p4hir.dir = #p4hir<dir undir>}) { | ||
// CHECK: p4hir.return | ||
action bar(bit<16> arg1) { | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters