8000 gh-131798: JIT: Split `CALL_TYPE_1` into several uops by tomasr8 · Pull Request #132419 · python/cpython · GitHub
[go: up one dir, main page]

Skip to content

gh-131798: JIT: Split CALL_TYPE_1 into several uops #132419

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

Merged
merged 16 commits into from
Apr 22, 2025
Merged
Prev Previous commit
Next Next commit
Improve test
Co-authored-by: Brandt Bucher <brandtbucher@gmail.com>
  • Loading branch information
tomasr8 and brandtbucher authored Apr 12, 2025
commit 0f6c12b2e590dbd2019383edcff99a30e8f7640d
5 changes: 3 additions & 2 deletions Lib/test/test_capi/test_opt.py
Original file line number Diff line number Diff line change
Expand Up @@ -1769,12 +1769,13 @@ def testfunc(n):

def test_call_type_1(self):
def testfunc(n):
x = 0
for _ in range(n):
x = type(42)
x += type(42) is int
return x

res, ex = self._run_with_optimizer(testfunc, TIER2_THRESHOLD)
self.assertEqual(res, int)
self.assertEqual(res, TIER2_THRESHOLD)
self.assertIsNotNone(ex)
uops = get_opnames(ex)
self.assertIn("_CALL_TYPE_1", uops)
Expand Down
Loading
0