[mlir][index] Mark certain ops as Commutative
commit3620af84d2ae577c7a12f83192c6dad2ce85e00c
authorJeff Niu <jeff@modular.com>
Sun, 25 Jun 2023 21:28:14 +0000 (25 14:28 -0700)
committerJeff Niu <jeff@modular.com>
Mon, 26 Jun 2023 18:49:06 +0000 (26 11:49 -0700)
treef5958e20b50aa91ce89681233305e8d23311f6d1
parentafa1fc47b669d8cbd480cb50a0d10aea8e1e4007
[mlir][index] Mark certain ops as Commutative

Mark the relevant index dialect operations as Commutative. Specifically,
this allows the folder to move constant operands to the RHS.

Reviewed By: rriddle

Differential Revision: https://reviews.llvm.org/D153731
mlir/include/mlir/Dialect/Index/IR/IndexOps.td