Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[CombFolds] Optimize OrOp whose operands are mux of the same value and a zero. #5730

Merged
merged 2 commits into from
Aug 1, 2023

Conversation

uenoku
Copy link
Member

@uenoku uenoku commented Jul 31, 2023

This implements a canonicalizer
or(mux(c_1, a, 0), mux(c_2, a, 0), ..., mux(c_n, a, 0)) -> mux(or(c_1, c_2, .., c_n), a, 0)

Copy link
Contributor

@dtzSiFive dtzSiFive left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

lib/Dialect/Comb/CombFolds.cpp Outdated Show resolved Hide resolved
lib/Dialect/Comb/CombFolds.cpp Outdated Show resolved Hide resolved
@uenoku uenoku merged commit dc0b808 into main Aug 1, 2023
5 checks passed
@uenoku uenoku deleted the dev/uenoku/comb-folds-mux1h branch August 1, 2023 16:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants