Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[mlir][FoldUtils] Ensure the created constant dominates the replaced op
This revision fixes a bug where an operation would get replaced with a pre-existing constant that didn't dominate it. This can occur when a pattern inserts operations to be folded at the beginning of the constants insertion block. This revision fixes the bug by moving the existing constant before the replaced operation in such cases. This is fine because if a constant didn't already exist, a new one would have been inserted before this operation anyways. Differential Revision: https://reviews.llvm.org/D108498
- Loading branch information
Showing
3 changed files
with
46 additions
and
1 deletion.
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
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