[Git][ghc/ghc][master] testsuite: Add a test for #18923
Marge Bot
gitlab at gitlab.haskell.org
Sat Dec 5 14:07:20 UTC 2020
Marge Bot pushed to branch master at Glasgow Haskell Compiler / GHC
Commits:
8fac4b93 by Ben Gamari at 2020-12-05T09:07:13-05:00
testsuite: Add a test for #18923
- - - - -
2 changed files:
- + testsuite/tests/perf/compiler/T18923.hs
- testsuite/tests/perf/compiler/all.T
Changes:
=====================================
testsuite/tests/perf/compiler/T18923.hs
=====================================
@@ -0,0 +1,16 @@
+module T18923 (mergeRec, Rec) where
+
+mayMerge :: Maybe b -> Maybe b -> Maybe b
+mayMerge Nothing y = y
+mayMerge x Nothing = x
+mayMerge (Just x) (Just y) = Just y
+
+data Rec = Rec { v0,v1,v2,v3,v4,v5,v6,v7 :: !(Maybe Bool) }
+
+mergeRec :: Rec -> Rec -> Rec
+mergeRec
+ (Rec a0 a1 a2 a3 a4 a5 a6 a7)
+ (Rec b0 b1 b2 b3 b4 b5 b6 b7) =
+ Rec (mayMerge a0 b0) (mayMerge a1 b1) (mayMerge a2 b2) (mayMerge a3 b3)
+ (mayMerge a4 b4) (mayMerge a5 b5) (mayMerge a6 b6) (mayMerge a7 b7)
+
=====================================
testsuite/tests/perf/compiler/all.T
=====================================
@@ -434,3 +434,7 @@ test ('T18223',
],
compile,
['-v0 -O'])
+test ('T18923',
+ [ collect_compiler_stats('bytes allocated',2) ],
+ compile,
+ ['-v0 -O'])
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/8fac4b9333ef3607e75b4520d847054316cb8c2d
--
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/8fac4b9333ef3607e75b4520d847054316cb8c2d
You're receiving this email because of your account on gitlab.haskell.org.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.haskell.org/pipermail/ghc-commits/attachments/20201205/e65ee0b0/attachment-0001.html>
More information about the ghc-commits
mailing list