summaryrefslogtreecommitdiffstats
path: root/mlir/test/lib/TestDialect
diff options
context:
space:
mode:
authorGeoffrey Martin-Noble <gcmn@google.com>2019-10-10 15:01:34 -0700
committerJacques Pienaar <jpienaar@google.com>2019-10-10 17:19:57 -0700
commit736f80d0ddd87dcdf165aa39730a4af04a8f71e2 (patch)
tree344d7fa7f3bd9640ceeeb5b0c0128848df6c7a3d /mlir/test/lib/TestDialect
parent6b1cc3c6eac0f76c6a771cb8dbde4d8b58c34f21 (diff)
downloadbcm5719-llvm-736f80d0ddd87dcdf165aa39730a4af04a8f71e2.tar.gz
bcm5719-llvm-736f80d0ddd87dcdf165aa39730a4af04a8f71e2.zip
Add trait for specified shapes matching
PiperOrigin-RevId: 274046434
Diffstat (limited to 'mlir/test/lib/TestDialect')
-rw-r--r--mlir/test/lib/TestDialect/TestOps.td7
1 files changed, 7 insertions, 0 deletions
diff --git a/mlir/test/lib/TestDialect/TestOps.td b/mlir/test/lib/TestDialect/TestOps.td
index 429a5e761fb..b26360f3d2c 100644
--- a/mlir/test/lib/TestDialect/TestOps.td
+++ b/mlir/test/lib/TestDialect/TestOps.td
@@ -309,6 +309,13 @@ def OperandZeroAndResultHaveSameRank :
let results = (outs AnyShaped:$res);
}
+def OperandZeroAndResultHaveSameShape :
+ TEST_Op<"operand0_and_result_have_same_shape",
+ [AllShapesMatch<["x", "res"]>]> {
+ let arguments = (ins AnyShaped:$x, AnyShaped:$y);
+ let results = (outs AnyShaped:$res);
+}
+
def OperandZeroAndResultHaveSameElementCount :
TEST_Op<"operand0_and_result_have_same_element_count",
[AllElementCountsMatch<["x", "res"]>]> {
OpenPOWER on IntegriCloud