Simon Jakobi pushed to branch wip/sjakobi/T11226 at Glasgow Haskell Compiler / GHC Commits: 3353cd12 by Simon Jakobi at 2026-05-27T16:00:31+02: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/3353cd12f8731524b1901601792526b1... -- View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/3353cd12f8731524b1901601792526b1... You're receiving this email because of your account on gitlab.haskell.org.
participants (1)
-
Simon Jakobi (@sjakobi2)