forked from llvm/llvm-project
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[MLIR] Add canonicalizations to all eligible
index
binary ops (llvm…
…#114000) Generalizes the following canonicalization pattern to all associative and commutative binary ops in the `index` dialect. ``` x = v + c1 y = x + c2 --> y = x + (c1 + c2) ``` This includes: - `AddOp` - `MulOp` - `MaxSOp` - `MaxUOp` - `MinSOp` - `MinUOp` - `AndOp` - `OrOp` - `XOrOp` The operation folding is implemented using the existing folders since `createAndFold` is used in the canonicalization.
- Loading branch information
1 parent
c7547e2
commit 6242552
Showing
3 changed files
with
183 additions
and
23 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
Oops, something went wrong.