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 4b99dac commit ab7c1c7Copy full SHA for ab7c1c7
Lib/test/test_capi/test_opt.py
@@ -2234,6 +2234,21 @@ def testfunc(n):
2234
self.assertNotIn("_GUARD_TOS_INT", uops)
2235
self.assertNotIn("_GUARD_NOS_INT", uops)
2236
2237
+ def test_unary_invert_bool_type(self):
2238
+ def testfunc(n):
2239
+ for _ in range(n):
2240
+ a = True
2241
+ x = ~a + ~a
2242
+
2243
+ testfunc(TIER2_THRESHOLD)
2244
2245
+ ex = get_first_executor(testfunc)
2246
+ self.assertIsNotNone(ex)
2247
+ uops = get_opnames(ex)
2248
2249
+ self.assertNotIn("_GUARD_TOS_INT", uops)
2250
+ self.assertNotIn("_GUARD_NOS_INT", uops)
2251
2252
2253
def global_identity(x):
2254
return x
0 commit comments