Skip to content

[TableGen] Fix computeRegUnitLaneMasks for ad hoc aliasing #79462

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

Closed
wants to merge 1 commit into from
Closed

[TableGen] Fix computeRegUnitLaneMasks for ad hoc aliasing #79462

wants to merge 1 commit into from

Conversation

jayfoad
Copy link
Contributor

@jayfoad jayfoad commented Jan 25, 2024

With ad hoc aliasing (using the Aliases field in register definitions)
we can have subregisters with disjoint lane masks that nevertheless
share a regunit. In this case we need to take the union of their
lane masks, not the intersection.

This was inadvertently broken by https://reviews.llvm.org/D157864

Fixes #78942

With ad hoc aliasing (using the Aliases field in register definitions)
we can have subregisters with disjoint lane masks that nevertheless
share a regunit. In this case we need to take the union of their
lane masks, not the intersection.

This was inadvertently broken by https://reviews.llvm.org/D157864
@jayfoad
Copy link
Contributor Author

jayfoad commented Jan 25, 2024

@kaz7 can you write a test for this?

@kaz7
Copy link
Contributor

kaz7 commented Jan 27, 2024

Thank you!

I've noticed this PR just now. I'll try to create test cases. I can create test cases for VE like checking live-in problems described in #78942 . However, such tests work only on VE environment. So, I think it's better to have different tests something like to check the output of TableGen directly. I'll try to create such one.

@kaz7
Copy link
Contributor

kaz7 commented Jan 27, 2024

@jayfoad ,

I made a test in main...kaz7:llvm-project:computeregunitlanemasks-test. I tried to push it to your fork, but it won't work. Can you cherry-pick my patch? This test work fine with a tablegen after this PR. And, it causes errors if someone try to calculate lanemask using intersection.

Copy link
Contributor

@kaz7 kaz7 left a comment

Choose a reason for hiding this comment

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

Works correctly on VE.

@jayfoad jayfoad closed this by deleting the head repository Jan 29, 2024
@jayfoad
Copy link
Contributor Author

jayfoad commented Jan 29, 2024

jayfoad closed this by deleting the head repository 3 hours ago

Sorry about that. Recreated as #79835.

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.

Calculation of regunitmasks seems wrong
2 participants