-
Notifications
You must be signed in to change notification settings - Fork 113
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[transforms] Fix simplification patterns for
stablehlo.(and|or)
Fixes an issue in `stablehlo-aggressive-simplification` where `%1` in the below would get replaced by `%arg0`: ``` %0 = stablehlo.constant dense<1> : tensor<2xi32> %1 = stablehlo.and %0, %arg0 : tensor<2xi32> ``` The pattern was checking whether `%0` is equal to `0b1` and was only tested on bools. A similar bug existed for `stablehlo.and`. Fixed by just making sure the constant is integer with all bits set to 1.
- Loading branch information
1 parent
f21104d
commit 59ce025
Showing
2 changed files
with
50 additions
and
2 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