[mlir][arith] Move canonicalization patterns to fold#184381
Closed
amd-eochoalo wants to merge 3 commits into
Closed
[mlir][arith] Move canonicalization patterns to fold#184381amd-eochoalo wants to merge 3 commits into
amd-eochoalo wants to merge 3 commits into
Conversation
| // The inner exact guarantees the iN -> index conversion is lossless, | ||
| // so the roundtrip through index preserves the value. | ||
| if (auto innerCast = getIn().getDefiningOp<IndexCastOp>()) { | ||
| if (innerCast.getIn().getType() == getType() && innerCast.getIsExact()) |
Contributor
There was a problem hiding this comment.
I posted a question about this scenario in your previous PR:
https://github.com/llvm/llvm-project/pull/183395/changes#r2880422529
I hope we reach a reasonable resolution :) Thank you!
Contributor
Author
|
Closed: relevant RFC https://discourse.llvm.org/t/rfc-clarifying-indextype-s-role-in-arith-rewrites/90433 |
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
#183395 added canonicalization patterns
cast(cast(x, exact)) -> x.One review comment stated the following:
Moving these to be folders allows one to reuse this patterns in the narrow integer ranges which will run folders but not canonicalization. This allows us to remove
FoldIndexCastChain.Assisted-by: Claude