Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Merge remote-tracking branch 'upstream/main' into load_consts_inline_…
…borrow_prmoted
  • Loading branch information
Fidget-Spinner committed Dec 18, 2025
commit 57c6da22f569a4af74753ef5afb5f50b9724cf31
18 changes: 18 additions & 0 deletions Lib/test/test_capi/test_opt.py
Original file line number Diff line number Diff line change
Expand Up @@ -3026,6 +3026,24 @@ def testfunc(n):
"""), PYTHON_JIT="1")
self.assertEqual(result[0].rc, 0, result)

def test_binary_subscr_list_int(self):
def testfunc(n):
l = [1]
x = 0
for _ in range(n):
y = l[0]
x += y
return x

res, ex = self._run_with_optimizer(testfunc, TIER2_THRESHOLD)
self.assertEqual(res, TIER2_THRESHOLD)
self.assertIsNotNone(ex)
uops = get_opnames(ex)

self.assertIn("_BINARY_OP_SUBSCR_LIST_INT", uops)
self.assertNotIn("_POP_TOP", uops)
self.assertNotIn("_POP_TOP_INT", uops)
self.assertIn("_POP_TOP_NOP", uops)

def global_identity(x):
return x
Expand Down
Loading
You are viewing a condensed version of this merge commit. You can view the full changes here.