[mlir][Interfaces] ValueBoundsOpInterface: Check if two values are equal
authorMatthias Springer <me@m-sp.org>
Thu, 25 May 2023 17:03:17 +0000 (19:03 +0200)
committerMatthias Springer <me@m-sp.org>
Thu, 25 May 2023 17:08:48 +0000 (19:08 +0200)
commitff9306459ff2f09b18ccbd4b5cefaf833730f42d
tree7adb35df9d1542123d81c564de56e66da2deac4d
parenta7a4bb691c1da37ff275fee39fb04ebd0857f5ba
[mlir][Interfaces] ValueBoundsOpInterface: Check if two values are equal

Add a helper function that computes if two SSA values have the same value, utilizing the `ValueBoundsOpInterface` infrastructure. Two SSA values have the same value, an equality bound of 0 can be derived for their subtraction.

The helper function can also be used to determine if two tensor dimension sizes are equal.

Differential Revision: https://reviews.llvm.org/D151443
mlir/include/mlir/Interfaces/ValueBoundsOpInterface.h
mlir/lib/Interfaces/ValueBoundsOpInterface.cpp
mlir/test/Dialect/Tensor/value-bounds-op-interface-impl.mlir
mlir/test/lib/Dialect/Affine/TestReifyValueBounds.cpp