diff options
| author | David Terei <davidterei@gmail.com> | 2011-07-20 11:09:03 -0700 |
|---|---|---|
| committer | David Terei <davidterei@gmail.com> | 2011-07-20 11:26:35 -0700 |
| commit | 16514f272fb42af6e9c7674a9bd6c9dce369231f (patch) | |
| tree | e4f332b45fe65e2a7a2451be5674f887b42bf199 /testsuite/tests/eyeball/inline4.hs | |
| parent | ebd422aed41048476aa61dd4c520d43becd78682 (diff) | |
| download | haskell-16514f272fb42af6e9c7674a9bd6c9dce369231f.tar.gz | |
Move tests from tests/ghc-regress/* to just tests/*
Diffstat (limited to 'testsuite/tests/eyeball/inline4.hs')
| -rw-r--r-- | testsuite/tests/eyeball/inline4.hs | 40 |
1 files changed, 40 insertions, 0 deletions
diff --git a/testsuite/tests/eyeball/inline4.hs b/testsuite/tests/eyeball/inline4.hs new file mode 100644 index 0000000000..2648c9e039 --- /dev/null +++ b/testsuite/tests/eyeball/inline4.hs @@ -0,0 +1,40 @@ +module CmmTx where
+
+data TxRes a = TxRes Bool a
+
+instance Monad TxRes where
+ return = TxRes False
+
+{- Here you can get a simplifier loop thus:
+NOTE: Simplifier still going after 4 iterations; bailing out. Size = 52
+NOTE: Simplifier still going after 4 iterations; bailing out. Size = 52
+NOTE: Simplifier still going after 4 iterations; bailing out. Size = 52
+NOTE: Simplifier still going after 4 iterations; bailing out. Size = 52
+
+Reason: 'a' is inline (not pre/post unconditionally; just ordinary inlining)
+Then, since ($dm>>) has arity 3, the rhs of (>>) is a PAP, so the arg is
+floated out, past the big lambdas.
+
+See Note [Unsaturated functions] in SimplUtils
+
+------------------------------------------------------------
+a_s9f{v} [lid] =
+ base:GHC.Base.:DMonad{v r5} [gid]
+ @ main:CmmTx.TxRes{tc rd}
+ >>={v a6E} [lid]
+ >>{v a6H} [lid]
+ return{v a6J} [lid]
+ fail{v a6M} [lid]
+>>{v a6H} [lid] [ALWAYS LoopBreaker Nothing] :: forall a{tv a6F} [tv]
+ b{tv a6G} [tv].
+ main:CmmTx.TxRes{tc rd} a{tv a6F} [tv]
+ -> main:CmmTx.TxRes{tc rd} b{tv a6G} [tv]
+ -> main:CmmTx.TxRes{tc rd} b{tv a6G} [tv]
+[Arity 2
+ Str: DmdType LL]
+>>{v a6H} [lid] =
+ \ (@ a{tv a78} [sk] :: ghc-prim:GHC.Prim.*{(w) tc 34d})
+ (@ b{tv a79} [sk] :: ghc-prim:GHC.Prim.*{(w) tc 34d}) ->
+ base:GHC.Base.$dm>>{v r5f} [gid]
+ @ main:CmmTx.TxRes{tc rd} a_s9f{v} [lid] @ a{tv a78} [sk] @ b{tv a79} [sk]
+ -}
|
