-
Notifications
You must be signed in to change notification settings - Fork 12k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Reassociate] Keep flags for more unchanged operations
Reassociation destroys nsw/nuw flags from BinOps that are changed. But if the expression at the end of a tree that was altered, but didn't change itself, the flags do not need to be removed. For example, if %a, %b and %c are reassociated in %x = add nsw i32 %a, %c %y = add nsw i32 %x, %b %z = add nsw i32 %y, %d The value of %y and so add %y %d remains the same, and %z needn't drop the nsw flags. https://alive2.llvm.org/ce/z/_juAiV Differential Revision: https://reviews.llvm.org/D154289
- Loading branch information
1 parent
273600c
commit db32d11
Showing
3 changed files
with
44 additions
and
27 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
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