[Git][ghc/ghc][master] Add regression test for T11226
Marge Bot pushed to branch master at Glasgow Haskell Compiler / GHC Commits: f4fbb583 by Simon Jakobi at 2026-05-28T12:26:04-04:00 Add regression test for T11226 Closes #11226. - - - - - 3 changed files: - + testsuite/tests/perf/should_run/T11226.hs - + testsuite/tests/perf/should_run/T11226.stdout - testsuite/tests/perf/should_run/all.T Changes: ===================================== testsuite/tests/perf/should_run/T11226.hs ===================================== @@ -0,0 +1,10 @@ +module Main where + +main :: IO () +main = print $ sum $ map bitcount [0, 4 .. 2 ^ (24 :: Int) - 1] + +bitcount :: Int -> Int +bitcount x = + if x > 0 + then let (d, m) = divMod x 2 in bitcount d + m + else 0 ===================================== testsuite/tests/perf/should_run/T11226.stdout ===================================== @@ -0,0 +1 @@ +46137344 ===================================== testsuite/tests/perf/should_run/all.T ===================================== @@ -30,6 +30,13 @@ test('T10359', compile_and_run, ['-O']) +test('T11226', + [collect_runtime_residency(10), + only_ways(['normal']) + ], + compile_and_run, + ['-O2']) + test('T14955', [collect_stats('bytes allocated',5), only_ways(['normal']) View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/f4fbb5832f210f7e1240f626880ad787... -- View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/f4fbb5832f210f7e1240f626880ad787... You're receiving this email because of your account on gitlab.haskell.org.
participants (1)
-
Marge Bot (@marge-bot)