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

MOS: Avoid commutating operands when doing so would lead to less trivial copies. #453

Merged
merged 2 commits into from
Mar 10, 2024

Conversation

asiekierka
Copy link
Contributor

Fixes #383 .

I can't help but wonder if this case couldn't be caught in a more generalized manner - but I lack the wisdom to get there myself 🥲

Copy link
Member

@mysterymath mysterymath left a comment

Choose a reason for hiding this comment

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

Nice find on the interface for this; another X86-specific gem.

llvm/lib/Target/MOS/MOSInstrInfo.cpp Show resolved Hide resolved
Copy link
Member

@mysterymath mysterymath left a comment

Choose a reason for hiding this comment

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

LGTM!

@mysterymath mysterymath merged commit f24ffe6 into llvm-mos:main Mar 10, 2024
3 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.

Missed optimization opportunity when doing a commutative operation on A and X (or Y?)
2 participants