From 90b7f4341d1339fc2cf03faca8a6360cb844ed41 Mon Sep 17 00:00:00 2001 From: chenyu Date: Thu, 12 Mar 2026 04:04:36 -0400 Subject: [PATCH] failed two level divmod recombine case (#15233) --- test/null/test_uop_symbolic.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/test/null/test_uop_symbolic.py b/test/null/test_uop_symbolic.py index 423a88ba14..c1d0f4af6d 100644 --- a/test/null/test_uop_symbolic.py +++ b/test/null/test_uop_symbolic.py @@ -786,6 +786,14 @@ class TestSymbolic(unittest.TestCase): # div nests: y//12 -> a//2, mod nests: y%12 -> (a%2)*6+b, recombine self.helper_test_variable((y//12)*12 + y%12, 0, 43, "(b+a*6)") + def test_div_mod_recombine_after_asymmetric_fold(self): + a = Variable("a", 0, 7) + b = Variable("b", 0, 14) + x = a*15+b + # TODO: expected "(b+a*15)" + self.helper_test_variable((x//10)*10 + x%10, 0, 119, "(a*10+(a+b//5)//2*10+(b+a*5)%10)") + self.helper_test_variable((x//10)*2 + (x//5)%2, 0, 23, "(a*3+b//5)") + def test_div_mod_recombine_in_additive_sum(self): x = Variable("x", 0, 31) y = Variable("y", 0, 5)