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

RFC: Negate 32-bit constants to inline #3552

Closed

Conversation

alyssarosenzweig
Copy link
Collaborator

RFC because this regresses instruction count in certain cases with complex addressing modes, I'm not sure where this is going wrong / whether it's an easy fix. See instcountci.

the arm ops are equiv, even though the x86 isn't (due to inverted carry).

Signed-off-by: Alyssa Rosenzweig <[email protected]>
Signed-off-by: Alyssa Rosenzweig <[email protected]>
Signed-off-by: Alyssa Rosenzweig <[email protected]>
Signed-off-by: Alyssa Rosenzweig <[email protected]>
"mov w20, #0xffffffcc",
"str w10, [x9, w20, sxtw]",
"sub w20, w9, #0x34 (52)",
"str w10, [x20]",
Copy link
Member

Choose a reason for hiding this comment

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

I think we need to teach a pass that stores with small offset in the range of [-256, 256) can inline the immediate. Which it looks like it doesn't understand the negative half of that equation yet.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Mm.. I'm going to close this for now since RA is more pressing, can maybe revisit later if @pmatos doesn't beat me to it

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.

2 participants