File tree Expand file tree Collapse file tree 1 file changed +17
-0
lines changed
Expand file tree Collapse file tree 1 file changed +17
-0
lines changed Original file line number Diff line number Diff line change @@ -1615,6 +1615,23 @@ def f(n):
16151615 # But all of the appends we care about are still there:
16161616 self .assertEqual (uops .count ("_CALL_LIST_APPEND" ), len ("ABCDEFG" ))
16171617
1618+ def test_compare_pop_two_load_const_inline_borrow (self ):
1619+ def testfunc (n ):
1620+ x = 0
1621+ for _ in range (n ):
1622+ a = 10
1623+ b = 10
1624+ if a == b :
1625+ x += 1
1626+ return x
1627+
1628+ res , ex = self ._run_with_optimizer (testfunc , TIER2_THRESHOLD )
1629+ self .assertEqual (res , TIER2_THRESHOLD )
1630+ self .assertIsNotNone (ex )
1631+ uops = get_opnames (ex )
1632+ self .assertNotIn ("_COMPARE_OP_INT" , uops )
1633+ self .assertNotIn ("_POP_TWO_LOAD_CONST_INLINE_BORROW" , uops )
1634+
16181635 def test_to_bool_bool_contains_op_set (self ):
16191636 """
16201637 Test that _TO_BOOL_BOOL is removed from code like:
You can’t perform that action at this time.
0 commit comments