Add SameOperandsAndResultElementType trait.
authorJacques Pienaar <jpienaar@google.com>
Sat, 4 May 2019 18:14:40 +0000 (11:14 -0700)
committerMehdi Amini <joker.eph@gmail.com>
Mon, 6 May 2019 15:28:59 +0000 (08:28 -0700)
commitdcab80115ff8379c269748f1b5565ea88aff176a
tree937413d01f871274248476703adb9324b47122bb
parent3b930b0d706fd5f3bb89814bf15a03c39f1a722d
Add SameOperandsAndResultElementType trait.

    This trait only works for tensor and vector types at the moment, verifying that the element type of an op with only tensor and vector types match. Added a unit test for it as there is no op currently in core that uses this trait.

--

PiperOrigin-RevId: 246661697
mlir/include/mlir/IR/OpBase.td
mlir/include/mlir/IR/OpDefinition.h
mlir/lib/IR/Operation.cpp
mlir/unittests/IR/CMakeLists.txt
mlir/unittests/IR/OpDefinitionTest.cpp [new file with mode: 0644]