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

Fix commutation #3

Open
Bevinsky opened this issue Oct 14, 2018 · 0 comments
Open

Fix commutation #3

Bevinsky opened this issue Oct 14, 2018 · 0 comments

Comments

@Bevinsky
Copy link
Owner

Case example:

U8 sum8_2(U8 *p) {
  U8 s = 0;
  do {
    s += *p;
  } while (*p++ != 0);
  return s;
}

This has an issue with commutation where it's clear that we want to commute the ADD8r in the loop after regalloc, but not before (when twoaddr commutation is done).

It's possible that if we can solve the regalloc issue with clobbering A, it might make this better, but we should definitely improve commutation as well.

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

No branches or pull requests

1 participant