diff options
author | Simon Marlow <marlowsd@gmail.com> | 2011-05-25 14:56:51 +0100 |
---|---|---|
committer | Simon Marlow <marlowsd@gmail.com> | 2011-05-25 14:56:51 +0100 |
commit | 150277e86b6194775cda3f04db0867a39cb2fb91 (patch) | |
tree | c0c1eb23287c5d4897837bb2b68f9bf256b935ac /testsuite/tests/ghc-regress/simplCore | |
parent | 569830c95c22c96771595a410d9f547bd85e4bed (diff) | |
download | haskell-150277e86b6194775cda3f04db0867a39cb2fb91.tar.gz |
accept output
Diffstat (limited to 'testsuite/tests/ghc-regress/simplCore')
-rw-r--r-- | testsuite/tests/ghc-regress/simplCore/should_compile/T4908.stderr | 12 | ||||
-rw-r--r-- | testsuite/tests/ghc-regress/simplCore/should_compile/spec-inline.stderr | 304 |
2 files changed, 156 insertions, 160 deletions
diff --git a/testsuite/tests/ghc-regress/simplCore/should_compile/T4908.stderr b/testsuite/tests/ghc-regress/simplCore/should_compile/T4908.stderr index 2a4fd77eb8..be52e5c57d 100644 --- a/testsuite/tests/ghc-regress/simplCore/should_compile/T4908.stderr +++ b/testsuite/tests/ghc-regress/simplCore/should_compile/T4908.stderr @@ -3,9 +3,7 @@ Rec { T4908.f_$s$wf [Occ=LoopBreaker] :: GHC.Types.Int - -> GHC.Prim.Int# - -> GHC.Prim.Int# - -> GHC.Types.Bool + -> GHC.Prim.Int# -> GHC.Prim.Int# -> GHC.Types.Bool [GblId, Arity=3, Caf=NoCafRefs, Str=DmdType LLL] T4908.f_$s$wf = \ (sc :: GHC.Types.Int) @@ -23,15 +21,14 @@ end Rec } T4908.$wf :: GHC.Prim.Int# - -> (GHC.Types.Int, GHC.Types.Int) - -> GHC.Types.Bool + -> (GHC.Types.Int, GHC.Types.Int) -> GHC.Types.Bool [GblId, Arity=2, Caf=NoCafRefs, Str=DmdType LL, Unf=Unf{Src=<vanilla>, TopLvl=True, Arity=2, Value=True, ConLike=True, Cheap=True, Expandable=True, - Guidance=IF_ARGS [3 2] 11 2}] + Guidance=IF_ARGS [30 20] 101 20}] T4908.$wf = \ (ww :: GHC.Prim.Int#) (w :: (GHC.Types.Int, GHC.Types.Int)) -> case ww of ds { @@ -49,8 +46,7 @@ T4908.$wf = T4908.f [InlPrag=INLINE[0]] :: GHC.Types.Int - -> (GHC.Types.Int, GHC.Types.Int) - -> GHC.Types.Bool + -> (GHC.Types.Int, GHC.Types.Int) -> GHC.Types.Bool [GblId, Arity=2, Caf=NoCafRefs, diff --git a/testsuite/tests/ghc-regress/simplCore/should_compile/spec-inline.stderr b/testsuite/tests/ghc-regress/simplCore/should_compile/spec-inline.stderr index 3fe5c5c9a4..8d9242615a 100644 --- a/testsuite/tests/ghc-regress/simplCore/should_compile/spec-inline.stderr +++ b/testsuite/tests/ghc-regress/simplCore/should_compile/spec-inline.stderr @@ -1,152 +1,152 @@ -
-==================== Tidy Core ====================
-Roman.foo2 :: GHC.Types.Int
-[GblId,
- Caf=NoCafRefs,
- Str=DmdType m,
- Unf=Unf{Src=<vanilla>, TopLvl=True, Arity=0, Value=True,
- ConLike=True, Cheap=True, Expandable=True,
- Guidance=IF_ARGS [] 1 2}]
-Roman.foo2 = GHC.Types.I# 6
-
-Roman.foo1 :: Data.Maybe.Maybe GHC.Types.Int
-[GblId,
- Caf=NoCafRefs,
- Str=DmdType,
- Unf=Unf{Src=<vanilla>, TopLvl=True, Arity=0, Value=True,
- ConLike=True, Cheap=True, Expandable=True,
- Guidance=IF_ARGS [] 1 2}]
-Roman.foo1 = Data.Maybe.Just @ GHC.Types.Int Roman.foo2
-
-Roman.foo3 :: GHC.Types.Int
-[GblId, Str=DmdType b]
-Roman.foo3 =
- Control.Exception.Base.patError
- @ GHC.Types.Int "spec-inline.hs:(19,5)-(29,25)|function go"
-
-Rec {
-Roman.foo_$s$wgo [Occ=LoopBreaker]
- :: GHC.Prim.Int# -> GHC.Prim.Int# -> GHC.Prim.Int#
-[GblId, Arity=2, Caf=NoCafRefs, Str=DmdType LL]
-Roman.foo_$s$wgo =
- \ (sc :: GHC.Prim.Int#) (sc1 :: GHC.Prim.Int#) ->
- let {
- a [Dmd=Just L] :: GHC.Prim.Int#
- [LclId, Str=DmdType]
- a =
- GHC.Prim.+#
- (GHC.Prim.+#
- (GHC.Prim.+#
- (GHC.Prim.+# (GHC.Prim.+# (GHC.Prim.+# sc sc) sc) sc) sc)
- sc)
- sc } in
- case GHC.Prim.<=# sc1 0 of _ {
- GHC.Types.False ->
- case GHC.Prim.<# sc1 100 of _ {
- GHC.Types.False ->
- case GHC.Prim.<# sc1 500 of _ {
- GHC.Types.False ->
- Roman.foo_$s$wgo (GHC.Prim.+# a a) (GHC.Prim.-# sc1 1);
- GHC.Types.True -> Roman.foo_$s$wgo a (GHC.Prim.-# sc1 3)
- };
- GHC.Types.True -> Roman.foo_$s$wgo sc (GHC.Prim.-# sc1 2)
- };
- GHC.Types.True -> 0
- }
-end Rec }
-
-Roman.$wgo
- :: Data.Maybe.Maybe GHC.Types.Int
- -> Data.Maybe.Maybe GHC.Types.Int -> GHC.Prim.Int#
-[GblId,
- Arity=2,
- Str=DmdType SS,
- Unf=Unf{Src=<vanilla>, TopLvl=True, Arity=2, Value=True,
- ConLike=True, Cheap=True, Expandable=True,
- Guidance=IF_ARGS [6 3] 37 0}]
-Roman.$wgo =
- \ (w :: Data.Maybe.Maybe GHC.Types.Int)
- (w1 :: Data.Maybe.Maybe GHC.Types.Int) ->
- case w1 of _ {
- Data.Maybe.Nothing ->
- Roman.foo3
- `cast` (UnsafeCo GHC.Types.Int GHC.Prim.Int#
- :: GHC.Types.Int ~ GHC.Prim.Int#);
- Data.Maybe.Just x ->
- case x of _ { GHC.Types.I# ipv ->
- let {
- a [Dmd=Just L] :: GHC.Prim.Int#
- [LclId, Str=DmdType]
- a =
- GHC.Prim.+#
- (GHC.Prim.+#
- (GHC.Prim.+#
- (GHC.Prim.+# (GHC.Prim.+# (GHC.Prim.+# ipv ipv) ipv) ipv) ipv)
- ipv)
- ipv } in
- case w of _ {
- Data.Maybe.Nothing -> Roman.foo_$s$wgo a 10;
- Data.Maybe.Just n ->
- case n of _ { GHC.Types.I# x2 ->
- case GHC.Prim.<=# x2 0 of _ {
- GHC.Types.False ->
- case GHC.Prim.<# x2 100 of _ {
- GHC.Types.False ->
- case GHC.Prim.<# x2 500 of _ {
- GHC.Types.False ->
- Roman.foo_$s$wgo (GHC.Prim.+# a a) (GHC.Prim.-# x2 1);
- GHC.Types.True -> Roman.foo_$s$wgo a (GHC.Prim.-# x2 3)
- };
- GHC.Types.True -> Roman.foo_$s$wgo ipv (GHC.Prim.-# x2 2)
- };
- GHC.Types.True -> 0
- }
- }
- }
- }
- }
-
-Roman.foo_go [InlPrag=INLINE[0]]
- :: Data.Maybe.Maybe GHC.Types.Int
- -> Data.Maybe.Maybe GHC.Types.Int -> GHC.Types.Int
-[GblId,
- Arity=2,
- Str=DmdType SSm,
- Unf=Unf{Src=Worker=Roman.$wgo, TopLvl=True, Arity=2, Value=True,
- ConLike=True, Cheap=True, Expandable=True,
- Guidance=ALWAYS_IF(unsat_ok=True,boring_ok=False)
- Tmpl= \ (w [Occ=Once] :: Data.Maybe.Maybe GHC.Types.Int)
- (w1 [Occ=Once] :: Data.Maybe.Maybe GHC.Types.Int) ->
- case Roman.$wgo w w1 of ww { __DEFAULT -> GHC.Types.I# ww }}]
-Roman.foo_go =
- \ (w :: Data.Maybe.Maybe GHC.Types.Int)
- (w1 :: Data.Maybe.Maybe GHC.Types.Int) ->
- case Roman.$wgo w w1 of ww { __DEFAULT -> GHC.Types.I# ww }
-
-Roman.foo :: GHC.Types.Int -> GHC.Types.Int
-[GblId,
- Arity=1,
- Caf=NoCafRefs,
- Str=DmdType S(A)m,
- Unf=Unf{Src=InlineStable, TopLvl=True, Arity=1, Value=True,
- ConLike=True, Cheap=True, Expandable=True,
- Guidance=ALWAYS_IF(unsat_ok=True,boring_ok=False)
- Tmpl= \ (n [Occ=Once!] :: GHC.Types.Int) ->
- case n of n1 { GHC.Types.I# _ ->
- Roman.foo_go (Data.Maybe.Just @ GHC.Types.Int n1) Roman.foo1
- }}]
-Roman.foo =
- \ (n :: GHC.Types.Int) ->
- case n of _ { GHC.Types.I# ipv ->
- case Roman.foo_$s$wgo 6 ipv of ww { __DEFAULT -> GHC.Types.I# ww }
- }
-
-
------- Local rules for imported ids --------
-"SC:$wgo0" [ALWAYS]
- forall {sc :: GHC.Prim.Int# sc1 :: GHC.Prim.Int#}
- Roman.$wgo (Data.Maybe.Just @ GHC.Types.Int (GHC.Types.I# sc1))
- (Data.Maybe.Just @ GHC.Types.Int (GHC.Types.I# sc))
- = Roman.foo_$s$wgo sc sc1
-
-
+ +==================== Tidy Core ==================== +Roman.foo2 :: GHC.Types.Int +[GblId, + Caf=NoCafRefs, + Str=DmdType m, + Unf=Unf{Src=<vanilla>, TopLvl=True, Arity=0, Value=True, + ConLike=True, Cheap=True, Expandable=True, + Guidance=IF_ARGS [] 10 110}] +Roman.foo2 = GHC.Types.I# 6 + +Roman.foo1 :: Data.Maybe.Maybe GHC.Types.Int +[GblId, + Caf=NoCafRefs, + Str=DmdType, + Unf=Unf{Src=<vanilla>, TopLvl=True, Arity=0, Value=True, + ConLike=True, Cheap=True, Expandable=True, + Guidance=IF_ARGS [] 10 110}] +Roman.foo1 = Data.Maybe.Just @ GHC.Types.Int Roman.foo2 + +Roman.foo3 :: GHC.Types.Int +[GblId, Str=DmdType b] +Roman.foo3 = + Control.Exception.Base.patError + @ GHC.Types.Int "spec-inline.hs:(19,5)-(29,25)|function go" + +Rec { +Roman.foo_$s$wgo [Occ=LoopBreaker] + :: GHC.Prim.Int# -> GHC.Prim.Int# -> GHC.Prim.Int# +[GblId, Arity=2, Caf=NoCafRefs, Str=DmdType LL] +Roman.foo_$s$wgo = + \ (sc :: GHC.Prim.Int#) (sc1 :: GHC.Prim.Int#) -> + let { + a [Dmd=Just L] :: GHC.Prim.Int# + [LclId, Str=DmdType] + a = + GHC.Prim.+# + (GHC.Prim.+# + (GHC.Prim.+# + (GHC.Prim.+# (GHC.Prim.+# (GHC.Prim.+# sc sc) sc) sc) sc) + sc) + sc } in + case GHC.Prim.<=# sc1 0 of _ { + GHC.Types.False -> + case GHC.Prim.<# sc1 100 of _ { + GHC.Types.False -> + case GHC.Prim.<# sc1 500 of _ { + GHC.Types.False -> + Roman.foo_$s$wgo (GHC.Prim.+# a a) (GHC.Prim.-# sc1 1); + GHC.Types.True -> Roman.foo_$s$wgo a (GHC.Prim.-# sc1 3) + }; + GHC.Types.True -> Roman.foo_$s$wgo sc (GHC.Prim.-# sc1 2) + }; + GHC.Types.True -> 0 + } +end Rec } + +Roman.$wgo + :: Data.Maybe.Maybe GHC.Types.Int + -> Data.Maybe.Maybe GHC.Types.Int -> GHC.Prim.Int# +[GblId, + Arity=2, + Str=DmdType SS, + Unf=Unf{Src=<vanilla>, TopLvl=True, Arity=2, Value=True, + ConLike=True, Cheap=True, Expandable=True, + Guidance=IF_ARGS [60 30] 253 0}] +Roman.$wgo = + \ (w :: Data.Maybe.Maybe GHC.Types.Int) + (w1 :: Data.Maybe.Maybe GHC.Types.Int) -> + case w1 of _ { + Data.Maybe.Nothing -> + Roman.foo3 + `cast` (UnsafeCo GHC.Types.Int GHC.Prim.Int# + :: GHC.Types.Int ~ GHC.Prim.Int#); + Data.Maybe.Just x -> + case x of _ { GHC.Types.I# ipv -> + let { + a [Dmd=Just L] :: GHC.Prim.Int# + [LclId, Str=DmdType] + a = + GHC.Prim.+# + (GHC.Prim.+# + (GHC.Prim.+# + (GHC.Prim.+# (GHC.Prim.+# (GHC.Prim.+# ipv ipv) ipv) ipv) ipv) + ipv) + ipv } in + case w of _ { + Data.Maybe.Nothing -> Roman.foo_$s$wgo a 10; + Data.Maybe.Just n -> + case n of _ { GHC.Types.I# x2 -> + case GHC.Prim.<=# x2 0 of _ { + GHC.Types.False -> + case GHC.Prim.<# x2 100 of _ { + GHC.Types.False -> + case GHC.Prim.<# x2 500 of _ { + GHC.Types.False -> + Roman.foo_$s$wgo (GHC.Prim.+# a a) (GHC.Prim.-# x2 1); + GHC.Types.True -> Roman.foo_$s$wgo a (GHC.Prim.-# x2 3) + }; + GHC.Types.True -> Roman.foo_$s$wgo ipv (GHC.Prim.-# x2 2) + }; + GHC.Types.True -> 0 + } + } + } + } + } + +Roman.foo_go [InlPrag=INLINE[0]] + :: Data.Maybe.Maybe GHC.Types.Int + -> Data.Maybe.Maybe GHC.Types.Int -> GHC.Types.Int +[GblId, + Arity=2, + Str=DmdType SSm, + Unf=Unf{Src=Worker=Roman.$wgo, TopLvl=True, Arity=2, Value=True, + ConLike=True, Cheap=True, Expandable=True, + Guidance=ALWAYS_IF(unsat_ok=True,boring_ok=False) + Tmpl= \ (w [Occ=Once] :: Data.Maybe.Maybe GHC.Types.Int) + (w1 [Occ=Once] :: Data.Maybe.Maybe GHC.Types.Int) -> + case Roman.$wgo w w1 of ww { __DEFAULT -> GHC.Types.I# ww }}] +Roman.foo_go = + \ (w :: Data.Maybe.Maybe GHC.Types.Int) + (w1 :: Data.Maybe.Maybe GHC.Types.Int) -> + case Roman.$wgo w w1 of ww { __DEFAULT -> GHC.Types.I# ww } + +Roman.foo :: GHC.Types.Int -> GHC.Types.Int +[GblId, + Arity=1, + Caf=NoCafRefs, + Str=DmdType S(A)m, + Unf=Unf{Src=InlineStable, TopLvl=True, Arity=1, Value=True, + ConLike=True, Cheap=True, Expandable=True, + Guidance=ALWAYS_IF(unsat_ok=True,boring_ok=False) + Tmpl= \ (n [Occ=Once!] :: GHC.Types.Int) -> + case n of n1 { GHC.Types.I# _ -> + Roman.foo_go (Data.Maybe.Just @ GHC.Types.Int n1) Roman.foo1 + }}] +Roman.foo = + \ (n :: GHC.Types.Int) -> + case n of _ { GHC.Types.I# ipv -> + case Roman.foo_$s$wgo 6 ipv of ww { __DEFAULT -> GHC.Types.I# ww } + } + + +------ Local rules for imported ids -------- +"SC:$wgo0" [ALWAYS] + forall {sc :: GHC.Prim.Int# sc1 :: GHC.Prim.Int#} + Roman.$wgo (Data.Maybe.Just @ GHC.Types.Int (GHC.Types.I# sc1)) + (Data.Maybe.Just @ GHC.Types.Int (GHC.Types.I# sc)) + = Roman.foo_$s$wgo sc sc1 + + |