We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent e2389bd commit d2741f1Copy full SHA for d2741f1
Lib/test/test_capi/test_opt.py
@@ -2156,6 +2156,17 @@ def testfunc(n):
2156
self.assertIn("_GUARD_TYPE_VERSION", uops)
2157
self.assertNotIn("_CHECK_ATTR_CLASS", uops)
2158
2159
+ def test_load_small_int(self):
2160
+ def testfunc(n):
2161
+ x = 0
2162
+ for i in range(n):
2163
+ x += 1
2164
+ return x
2165
+ res, ex = self._run_with_optimizer(testfunc, TIER2_THRESHOLD)
2166
+ self.assertEqual(res, TIER2_THRESHOLD)
2167
+ self.assertIsNotNone(ex)
2168
+ uops = get_opnames(ex)
2169
+ self.assertIn("_LOAD_CONST_INLINE_BORROW", uops)
2170
2171
def global_identity(x):
2172
return x
0 commit comments