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

Fold select into if with the same condition #3919

Merged
merged 14 commits into from
May 17, 2024

Conversation

pawelszczerbuk
Copy link
Contributor

This pass is supposed to counteract the ConvertTrivialIfToSelect 2 canonicalization pattern (for tensors). The pattern results in hoisting the tensor assignments under an if out of it, converting them to selects. For tensors this is not ideal, as it results in big increase in predicated mov instructions in final assembly.
Addressing it in the upstream LLVM is being discussed.

Copy link
Contributor

@ThomasRaoux ThomasRaoux left a comment

Choose a reason for hiding this comment

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

LGTM

@pawelszczerbuk pawelszczerbuk merged commit 864cacb into triton-lang:main May 17, 2024
5 checks passed
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.

None yet

2 participants