-
Notifications
You must be signed in to change notification settings - Fork 182
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[XLS] Remove conditional specialization for operands of Boolean opera…
…tions It's not safe to specialize all operands of a Boolean operation at the same time based on visibility; this can only be done asymmetrically, or else we risk accidentally excluding cases where all operands are true. For example, it's true that when considering OR(A, B), we can assume that B is false while simplifying A, since the value of A is irrelevant whenever B is true. We can similarly assume that A is false while simplifying B. However... we can't do these at the same time. To see why, suppose it turns out that A = X and B = X (i.e., that A and B are logically equivalent). In this case, we might try to simplify OR(A, B) by replacing A with its value whenever B = 0 (i.e., replacing A with 0) and B with its value whenever A = 0 (i.e., replacing B with 0). This means we'd replace the expression with: OR(0, 0) = 0. However, if X is true, OR(A, B) = OR(1, 1) = 1. PiperOrigin-RevId: 710762944
- Loading branch information
1 parent
7da9772
commit 4651f2e
Showing
2 changed files
with
0 additions
and
130 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