diff --git a/testsuite/tests/perf/should_run/T7619.hs b/testsuite/tests/perf/should_run/T7619.hs
new file mode 100644
index 0000000000000000000000000000000000000000..d64073952b8c86a54c736969fa714bf8698ba0e9
--- /dev/null
+++ b/testsuite/tests/perf/should_run/T7619.hs
@@ -0,0 +1,12 @@
+{-# LANGUAGE TypeFamilies #-}
+module Main where
+data family Foo a
+
+data instance Foo Int = FooInt Int Int
+
+foo :: Foo Int -> Int
+foo (FooInt a 0) = 0
+foo (FooInt a b) = foo (FooInt a (b-1))
+
+main :: IO ()
+main = foo (FooInt 0 10000) `seq` return ()
diff --git a/testsuite/tests/perf/should_run/all.T b/testsuite/tests/perf/should_run/all.T
index 4f6a9d35c0c2e5b0fa74f135d5fa2d682ca65a4a..98a68d7e395827ed50acd90f74ef39e841c9f231 100644
--- a/testsuite/tests/perf/should_run/all.T
+++ b/testsuite/tests/perf/should_run/all.T
@@ -314,3 +314,11 @@ test('T4267',
      compile_and_run,
      ['-O'])
 
+test('T7619',
+     [stats_num_field('bytes allocated',
+                      [ (wordsize(64), 40992, 10)]),
+                      # previously, it was >400000 bytes
+      only_ways(['normal'])],
+     compile_and_run,
+     ['-O'])
+