Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Comb] Fold mux if both arms are same constant
If both arms of a `comb.mux` evaluate to the same constant, fold the mux to that same constant. Right now this is only done if the SSA value is identical. Some constant propagation algorithms will call `fold` to propagate lattice constants, which isn't covered by just comparing SSA values. Short: also check adaptor's true and false value for folding, not just the op's true and false value.
- Loading branch information