File tree Expand file tree Collapse file tree 1 file changed +21
-0
lines changed Expand file tree Collapse file tree 1 file changed +21
-0
lines changed Original file line number Diff line number Diff line change @@ -539,6 +539,27 @@ def testfunc(n):
539
539
# too much already.
540
540
self .assertEqual (count , 1 )
541
541
542
+ def test_side_exits (self ):
543
+ def testfunc ():
544
+ for _ in range (100 ):
545
+ for i in range (100 ):
546
+ if i >= 70 :
547
+ i = 0
548
+
549
+ opt = _testinternalcapi .get_uop_optimizer ()
550
+ with temporary_optimizer (opt ):
551
+ testfunc ()
552
+
553
+ ex = get_first_executor (testfunc )
554
+ self .assertIsNotNone (ex )
555
+ uops = {opname for opname , _ , _ in ex }
556
+ self .assertIn ("_GUARD_IS_FALSE_POP" , uops )
557
+ subs = [sub for sub in ex .sub_executors () if sub is not None ]
558
+ self .assertGreater (len (subs ), 0 )
559
+ sub = subs [0 ]
560
+ sub_uops = {opname for opname , _ , _ in sub }
561
+ self .assertIn ("_GUARD_IS_TRUE_POP" , sub_uops )
562
+
542
563
543
564
if __name__ == "__main__" :
544
565
unittest .main ()
You can’t perform that action at this time.
0 commit comments