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

GH-111485: Break up instructions with unused cache entries into component micro-ops #113169

Merged
merged 8 commits into from
Dec 18, 2023
Merged
17 changes: 17 additions & 0 deletions Lib/test/test_generated_cases.py
Original file line number Diff line number Diff line change
Expand Up @@ -466,6 +466,23 @@ def test_macro_instruction(self):
"""
self.run_cases_test(input, output)

def test_unused_cache(self):
input = """
inst(OP, (unused/1 --)) {
body();
}
"""
output = """
TARGET(OP) {
frame->instr_ptr = next_instr;
next_instr += 2;
INSTRUCTION_STATS(OP);
body();
DISPATCH();
}
"""
self.run_cases_test(input, output)
Copy link
Member

Choose a reason for hiding this comment

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

I'm not sure this test is covering everything that changed in this PR.

Copy link
Member Author

Choose a reason for hiding this comment

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

Probably not, it is just a smoke test.
The real test is that everything continues to work properly.

Copy link
Member

Choose a reason for hiding this comment

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

Actually, it would be nice if there was a test that adds a /* Skip N cache entries */ comment where it wasn't before this PR, so we could see regressions around that. (I don't care about the singular/plural, but I care about it appearing at all.)


def test_pseudo_instruction_no_flags(self):
input = """
pseudo(OP) = {
Expand Down
Loading
Loading