summaryrefslogtreecommitdiff
path: root/testsuite/tests/simplCore/should_compile
diff options
context:
space:
mode:
Diffstat (limited to 'testsuite/tests/simplCore/should_compile')
-rw-r--r--testsuite/tests/simplCore/should_compile/OpaqueNoRebox.stderr11
-rw-r--r--testsuite/tests/simplCore/should_compile/T13143.stderr6
-rw-r--r--testsuite/tests/simplCore/should_compile/T18013.stderr2
-rw-r--r--testsuite/tests/simplCore/should_compile/T18355.stderr19
-rw-r--r--testsuite/tests/simplCore/should_compile/T21261.hs6
-rw-r--r--testsuite/tests/simplCore/should_compile/T21261.stderr49
-rw-r--r--testsuite/tests/simplCore/should_compile/T3717.stderr2
-rw-r--r--testsuite/tests/simplCore/should_compile/T3772.stdout4
-rw-r--r--testsuite/tests/simplCore/should_compile/T4201.stdout6
-rw-r--r--testsuite/tests/simplCore/should_compile/T4908.stderr2
-rw-r--r--testsuite/tests/simplCore/should_compile/T4930.stderr2
-rw-r--r--testsuite/tests/simplCore/should_compile/T7360.stderr8
-rw-r--r--testsuite/tests/simplCore/should_compile/T7865.stdout2
-rw-r--r--testsuite/tests/simplCore/should_compile/spec-inline.stderr4
14 files changed, 57 insertions, 66 deletions
diff --git a/testsuite/tests/simplCore/should_compile/OpaqueNoRebox.stderr b/testsuite/tests/simplCore/should_compile/OpaqueNoRebox.stderr
index ad82c9e16c..2be1c412df 100644
--- a/testsuite/tests/simplCore/should_compile/OpaqueNoRebox.stderr
+++ b/testsuite/tests/simplCore/should_compile/OpaqueNoRebox.stderr
@@ -45,7 +45,7 @@ OpaqueNoRebox.$trModule
-- RHS size: {terms: 7, types: 8, coercions: 0, joins: 0/0}
f [InlPrag=OPAQUE] :: (Int, Int) -> Int
[GblId, Arity=1, Str=<1P(1L,1L)>, Unf=OtherCon []]
-f = / (ds :: (Int, Int)) ->
+f = \ (ds :: (Int, Int)) ->
case ds of { (x, y) -> GHC.Num.$fNumInt_$c+ x y }
-- RHS size: {terms: 19, types: 14, coercions: 0, joins: 0/0}
@@ -54,10 +54,10 @@ g [InlPrag=[2]] :: (Int, Int) -> Int
Arity=1,
Str=<1P(SL,SL)>,
Cpr=1,
- Unf=Unf{Src=InlineStable, TopLvl=True, Value=True, ConLike=True,
+ Unf=Unf{Src=StableSystem, TopLvl=True, Value=True, ConLike=True,
WorkFree=True, Expandable=True,
Guidance=ALWAYS_IF(arity=1,unsat_ok=True,boring_ok=False)
- Tmpl= / (p [Occ=Once1!] :: (Int, Int)) ->
+ Tmpl= \ (p [Occ=Once1!] :: (Int, Int)) ->
case p of wild { (x [Occ=Once1!], _ [Occ=Dead]) ->
case x of { GHC.Types.I# x1 [Occ=Once1] ->
case f (f wild, f wild) of { GHC.Types.I# y [Occ=Once1] ->
@@ -65,7 +65,7 @@ g [InlPrag=[2]] :: (Int, Int) -> Int
}
}
}}]
-g = / (p :: (Int, Int)) ->
+g = \ (p :: (Int, Int)) ->
case p of wild { (x, ds1) ->
case x of { GHC.Types.I# x1 ->
case f (f wild, f wild) of { GHC.Types.I# y ->
@@ -73,3 +73,6 @@ g = / (p :: (Int, Int)) ->
}
}
}
+
+
+
diff --git a/testsuite/tests/simplCore/should_compile/T13143.stderr b/testsuite/tests/simplCore/should_compile/T13143.stderr
index 16189c6daa..1d4b3dd9fa 100644
--- a/testsuite/tests/simplCore/should_compile/T13143.stderr
+++ b/testsuite/tests/simplCore/should_compile/T13143.stderr
@@ -12,12 +12,12 @@ T13143.$wf = \ _ [Occ=Dead] (@a) -> T13143.$wf GHC.Prim.(##) @a
end Rec }
-- RHS size: {terms: 4, types: 3, coercions: 0, joins: 0/0}
-f [InlPrag=[final]] :: forall a. Int -> a
+f [InlPrag=NOINLINE[final]] :: forall a. Int -> a
[GblId,
Arity=1,
Str=<B>b,
Cpr=b,
- Unf=Unf{Src=InlineStable, TopLvl=True, Value=True, ConLike=True,
+ Unf=Unf{Src=StableSystem, TopLvl=True, Value=True, ConLike=True,
WorkFree=True, Expandable=True,
Guidance=ALWAYS_IF(arity=1,unsat_ok=True,boring_ok=True)
Tmpl= \ (@a) _ [Occ=Dead] -> T13143.$wf GHC.Prim.(##) @a}]
@@ -94,7 +94,7 @@ g [InlPrag=[2]] :: Bool -> Bool -> Int -> Int
Arity=3,
Str=<1L><1L><1!P(L)>,
Cpr=1,
- Unf=Unf{Src=InlineStable, TopLvl=True, Value=True, ConLike=True,
+ Unf=Unf{Src=StableSystem, TopLvl=True, Value=True, ConLike=True,
WorkFree=True, Expandable=True,
Guidance=ALWAYS_IF(arity=3,unsat_ok=True,boring_ok=False)
Tmpl= \ (ds [Occ=Once1] :: Bool)
diff --git a/testsuite/tests/simplCore/should_compile/T18013.stderr b/testsuite/tests/simplCore/should_compile/T18013.stderr
index b94cec212b..719f70df19 100644
--- a/testsuite/tests/simplCore/should_compile/T18013.stderr
+++ b/testsuite/tests/simplCore/should_compile/T18013.stderr
@@ -139,7 +139,7 @@ mapMaybeRule [InlPrag=[2]]
[GblId,
Arity=1,
Str=<1!P(L,LCS(C1(C1(P(L,1L)))))>,
- Unf=Unf{Src=InlineStable, TopLvl=True, Value=True, ConLike=True,
+ Unf=Unf{Src=StableSystem, TopLvl=True, Value=True, ConLike=True,
WorkFree=True, Expandable=True,
Guidance=ALWAYS_IF(arity=1,unsat_ok=True,boring_ok=False)
Tmpl= \ (@a) (@b) (f [Occ=Once1!] :: Rule IO a b) ->
diff --git a/testsuite/tests/simplCore/should_compile/T18355.stderr b/testsuite/tests/simplCore/should_compile/T18355.stderr
index 6b7372c5af..a21a492b6d 100644
--- a/testsuite/tests/simplCore/should_compile/T18355.stderr
+++ b/testsuite/tests/simplCore/should_compile/T18355.stderr
@@ -1,25 +1,16 @@
==================== Tidy Core ====================
Result size of Tidy Core
- = {terms: 32, types: 23, coercions: 0, joins: 0/0}
+ = {terms: 32, types: 21, coercions: 0, joins: 0/0}
--- RHS size: {terms: 17, types: 10, coercions: 0, joins: 0/0}
+-- RHS size: {terms: 17, types: 9, coercions: 0, joins: 0/0}
f :: forall {a}. Num a => a -> Bool -> a -> a
[GblId,
Arity=4,
- Str=<S,1*U(1*C1(C1(U)),1*C1(C1(U)),A,A,A,A,A)><L,U><S,1*U><L,U>,
- Unf=Unf{Src=InlineStable, TopLvl=True, Value=True, ConLike=True,
+ Str=<1P(MC1(C1(L)),MC1(C1(L)),A,A,A,A,A)><L><1L><L>,
+ Unf=Unf{Src=<vanilla>, TopLvl=True, Value=True, ConLike=True,
WorkFree=True, Expandable=True,
- Guidance=ALWAYS_IF(arity=4,unsat_ok=True,boring_ok=False)
- Tmpl= \ (@a)
- ($dNum [Occ=Once2] :: Num a)
- (x [Occ=Once2] :: a)
- (b [Occ=Once1!] :: Bool)
- (eta [Occ=Once2, OS=OneShot] :: a) ->
- case b of {
- False -> - @a $dNum x eta;
- True -> + @a $dNum x eta
- }}]
+ Guidance=IF_ARGS [60 0 70 0] 100 0}]
f = \ (@a)
($dNum :: Num a)
(x :: a)
diff --git a/testsuite/tests/simplCore/should_compile/T21261.hs b/testsuite/tests/simplCore/should_compile/T21261.hs
index 167d3f0f86..888c2fed13 100644
--- a/testsuite/tests/simplCore/should_compile/T21261.hs
+++ b/testsuite/tests/simplCore/should_compile/T21261.hs
@@ -1,3 +1,9 @@
+{-# OPTIONS_GHC -fno-worker-wrapper #-}
+
+-- The -fno-worker-wrapper stops f1, f2 etc from worker/wrappering
+-- via CPR analysis, after which they inline ane confuse the
+-- detection of eta-expansion or otherwise
+
module T21261 where
-- README: The convention here is that bindings starting with 'yes' should be
diff --git a/testsuite/tests/simplCore/should_compile/T21261.stderr b/testsuite/tests/simplCore/should_compile/T21261.stderr
index fadd73c219..6ed7bb9933 100644
--- a/testsuite/tests/simplCore/should_compile/T21261.stderr
+++ b/testsuite/tests/simplCore/should_compile/T21261.stderr
@@ -1,7 +1,7 @@
==================== Tidy Core ====================
Result size of Tidy Core
- = {terms: 139, types: 130, coercions: 0, joins: 0/0}
+ = {terms: 127, types: 120, coercions: 0, joins: 0/0}
lvl = I# 3#
@@ -13,58 +13,49 @@ f2 = \ c -> case c lvl2 of { __DEFAULT -> c lvl lvl1 }
yes1or2 = f2
-lvl3 = I# 2#
+lvl3 = I# 42#
-$wf4
+lvl4 = I# 2#
+
+f4
= \ c ->
- case c lvl2 lvl3 of { __DEFAULT ->
- case c lvl lvl1 of { __DEFAULT -> 42# }
+ case c lvl2 lvl4 of { __DEFAULT ->
+ case c lvl lvl1 of { __DEFAULT -> lvl3 }
}
-f4 = \ c -> case $wf4 c of ww { __DEFAULT -> I# ww }
-
-no3
- = \ c ->
- case $wf4 (\ x y z -> c x y z) of ww { __DEFAULT -> I# ww }
+no3 = \ c -> f4 (\ x y z -> c x y z)
-f6 = \ c -> case c lvl2 of { __DEFAULT -> c lvl3 lvl }
+f6 = \ c -> case c lvl2 of { __DEFAULT -> c lvl4 lvl }
no_tricky = \ c -> f6 (\ x y -> c x y)
-$wf7 = \ c -> (# case c lvl2 of { __DEFAULT -> c lvl lvl1 } #)
-
-f7 = \ c -> case $wf7 c of { (# ww #) -> Just ww }
+f7 = \ c -> Just (case c lvl2 of { __DEFAULT -> c lvl lvl1 })
no_tricky_lazy = \ c -> f7 (\ x y -> c x y)
-$wf5
+f5
= \ c ->
- (# case c lvl2 lvl3 of { I# x ->
+ Just
+ (case c lvl2 lvl4 of { I# x ->
case c lvl lvl1 of { I# y -> I# (+# x y) }
- } #)
-
-f5 = \ c -> case $wf5 c of { (# ww #) -> Just ww }
+ })
yes2_lazy = f5
-$wf3
+f3
= \ c ->
- case c lvl2 lvl3 of { I# x ->
- case c lvl lvl1 of { I# y -> +# x y }
+ case c lvl2 lvl4 of { I# x ->
+ case c lvl lvl1 of { I# y -> I# (+# x y) }
}
-f3 = \ c -> case $wf3 c of ww { __DEFAULT -> I# ww }
-
yes2 = f3
-$wf1
+f1
= \ c ->
- case c lvl2 lvl3 of { I# x ->
- case c lvl lvl1 of { I# y -> +# x y }
+ case c lvl2 lvl4 of { I# x ->
+ case c lvl lvl1 of { I# y -> I# (+# x y) }
}
-f1 = \ c -> case $wf1 c of ww { __DEFAULT -> I# ww }
-
yes1 = f1
diff --git a/testsuite/tests/simplCore/should_compile/T3717.stderr b/testsuite/tests/simplCore/should_compile/T3717.stderr
index f131214132..5da8a9f302 100644
--- a/testsuite/tests/simplCore/should_compile/T3717.stderr
+++ b/testsuite/tests/simplCore/should_compile/T3717.stderr
@@ -58,7 +58,7 @@ foo [InlPrag=[2]] :: Int -> Int
Arity=1,
Str=<1!P(1L)>,
Cpr=1,
- Unf=Unf{Src=InlineStable, TopLvl=True, Value=True, ConLike=True,
+ Unf=Unf{Src=StableSystem, TopLvl=True, Value=True, ConLike=True,
WorkFree=True, Expandable=True,
Guidance=ALWAYS_IF(arity=1,unsat_ok=True,boring_ok=False)
Tmpl= \ (ds [Occ=Once1!] :: Int) ->
diff --git a/testsuite/tests/simplCore/should_compile/T3772.stdout b/testsuite/tests/simplCore/should_compile/T3772.stdout
index 4a67fd8413..6faaab181a 100644
--- a/testsuite/tests/simplCore/should_compile/T3772.stdout
+++ b/testsuite/tests/simplCore/should_compile/T3772.stdout
@@ -62,12 +62,12 @@ T3772.$wfoo
}
-- RHS size: {terms: 9, types: 4, coercions: 0, joins: 0/0}
-foo [InlPrag=[final]] :: Int -> ()
+foo [InlPrag=NOINLINE[final]] :: Int -> ()
[GblId,
Arity=1,
Str=<1!P(L)>,
Cpr=1,
- Unf=Unf{Src=InlineStable, TopLvl=True, Value=True, ConLike=True,
+ Unf=Unf{Src=StableSystem, TopLvl=True, Value=True, ConLike=True,
WorkFree=True, Expandable=True,
Guidance=ALWAYS_IF(arity=1,unsat_ok=True,boring_ok=False)
Tmpl= \ (n [Occ=Once1!] :: Int) ->
diff --git a/testsuite/tests/simplCore/should_compile/T4201.stdout b/testsuite/tests/simplCore/should_compile/T4201.stdout
index 920ae57662..68d0bc48fd 100644
--- a/testsuite/tests/simplCore/should_compile/T4201.stdout
+++ b/testsuite/tests/simplCore/should_compile/T4201.stdout
@@ -1,4 +1,4 @@
+ [HasNoCafRefs, TagSig: <TagProper>, LambdaFormInfo: LFReEntrant 1,
Arity: 1, Strictness: <1!A>, CPR: 1,
- Unfolding: (bof
- `cast`
- (Sym (N:Foo[0]) %<'GHC.Types.Many>_N ->_R <T>_R))]
+ Unfolding: Core: <vanilla>
+ bof `cast` (Sym (N:Foo[0]) %<'GHC.Types.Many>_N ->_R <T>_R)]
diff --git a/testsuite/tests/simplCore/should_compile/T4908.stderr b/testsuite/tests/simplCore/should_compile/T4908.stderr
index 307c9fb728..a306a5a5e7 100644
--- a/testsuite/tests/simplCore/should_compile/T4908.stderr
+++ b/testsuite/tests/simplCore/should_compile/T4908.stderr
@@ -61,7 +61,7 @@ f [InlPrag=[2]] :: Int -> (Int, Int) -> Bool
Arity=2,
Str=<1!P(1L)><MP(A,1P(1L))>,
Cpr=2,
- Unf=Unf{Src=InlineStable, TopLvl=True, Value=True, ConLike=True,
+ Unf=Unf{Src=StableSystem, TopLvl=True, Value=True, ConLike=True,
WorkFree=True, Expandable=True,
Guidance=ALWAYS_IF(arity=2,unsat_ok=True,boring_ok=False)
Tmpl= \ (ds [Occ=Once1!] :: Int) (x [Occ=Once1!] :: (Int, Int)) ->
diff --git a/testsuite/tests/simplCore/should_compile/T4930.stderr b/testsuite/tests/simplCore/should_compile/T4930.stderr
index 413f892942..bc6bacdb40 100644
--- a/testsuite/tests/simplCore/should_compile/T4930.stderr
+++ b/testsuite/tests/simplCore/should_compile/T4930.stderr
@@ -58,7 +58,7 @@ foo [InlPrag=[2]] :: Int -> Int
Arity=1,
Str=<1!P(L)>,
Cpr=1,
- Unf=Unf{Src=InlineStable, TopLvl=True, Value=True, ConLike=True,
+ Unf=Unf{Src=StableSystem, TopLvl=True, Value=True, ConLike=True,
WorkFree=True, Expandable=True,
Guidance=ALWAYS_IF(arity=1,unsat_ok=True,boring_ok=False)
Tmpl= \ (n [Occ=Once1!] :: Int) ->
diff --git a/testsuite/tests/simplCore/should_compile/T7360.stderr b/testsuite/tests/simplCore/should_compile/T7360.stderr
index 345efa5a18..17eb1b5934 100644
--- a/testsuite/tests/simplCore/should_compile/T7360.stderr
+++ b/testsuite/tests/simplCore/should_compile/T7360.stderr
@@ -9,7 +9,7 @@ T7360.$WFoo3 [InlPrag=INLINE[final] CONLIKE] :: Int %1 -> Foo
Arity=1,
Caf=NoCafRefs,
Str=<SL>,
- Unf=Unf{Src=InlineStable, TopLvl=True, Value=True, ConLike=True,
+ Unf=Unf{Src=StableSystem, TopLvl=True, Value=True, ConLike=True,
WorkFree=True, Expandable=True,
Guidance=ALWAYS_IF(arity=1,unsat_ok=True,boring_ok=False)
Tmpl= \ (conrep [Occ=Once1!] :: Int) ->
@@ -27,12 +27,12 @@ T7360.$wfun1
= \ (x :: Foo) -> case x of { __DEFAULT -> GHC.Prim.(##) }
-- RHS size: {terms: 6, types: 2, coercions: 0, joins: 0/0}
-fun1 [InlPrag=[final]] :: Foo -> ()
+fun1 [InlPrag=NOINLINE[final]] :: Foo -> ()
[GblId,
Arity=1,
Str=<1A>,
Cpr=1,
- Unf=Unf{Src=InlineStable, TopLvl=True, Value=True, ConLike=True,
+ Unf=Unf{Src=StableSystem, TopLvl=True, Value=True, ConLike=True,
WorkFree=True, Expandable=True,
Guidance=ALWAYS_IF(arity=1,unsat_ok=True,boring_ok=False)
Tmpl= \ (x [Occ=Once1] :: Foo) ->
@@ -54,7 +54,7 @@ fun2 :: forall {a}. [a] -> ((), Int)
Arity=1,
Str=<ML>,
Cpr=1,
- Unf=Unf{Src=InlineStable, TopLvl=True, Value=True, ConLike=True,
+ Unf=Unf{Src=StableSystem, TopLvl=True, Value=True, ConLike=True,
WorkFree=True, Expandable=True,
Guidance=ALWAYS_IF(arity=1,unsat_ok=True,boring_ok=False)
Tmpl= \ (@a) (x [Occ=Once1] :: [a]) ->
diff --git a/testsuite/tests/simplCore/should_compile/T7865.stdout b/testsuite/tests/simplCore/should_compile/T7865.stdout
index 1dd2c25893..c8758d3af1 100644
--- a/testsuite/tests/simplCore/should_compile/T7865.stdout
+++ b/testsuite/tests/simplCore/should_compile/T7865.stdout
@@ -1,6 +1,6 @@
T7865.$wexpensive [InlPrag=NOINLINE]
T7865.$wexpensive
-expensive [InlPrag=[final]] :: Int -> Int
+expensive [InlPrag=NOINLINE[final]] :: Int -> Int
case T7865.$wexpensive ww of ww1 [Occ=Once1] { __DEFAULT ->
expensive
case T7865.$wexpensive ww of ww1 { __DEFAULT -> GHC.Types.I# ww1 }
diff --git a/testsuite/tests/simplCore/should_compile/spec-inline.stderr b/testsuite/tests/simplCore/should_compile/spec-inline.stderr
index e0b2ad4962..8705eeacea 100644
--- a/testsuite/tests/simplCore/should_compile/spec-inline.stderr
+++ b/testsuite/tests/simplCore/should_compile/spec-inline.stderr
@@ -113,7 +113,7 @@ Roman.foo_go [InlPrag=[2]] :: Maybe Int -> Maybe Int -> Int
Arity=2,
Str=<1L><1L>,
Cpr=1,
- Unf=Unf{Src=InlineStable, TopLvl=True, Value=True, ConLike=True,
+ Unf=Unf{Src=StableSystem, TopLvl=True, Value=True, ConLike=True,
WorkFree=True, Expandable=True,
Guidance=ALWAYS_IF(arity=2,unsat_ok=True,boring_ok=False)
Tmpl= \ (u [Occ=Once1] :: Maybe Int)
@@ -145,7 +145,7 @@ foo :: Int -> Int
Arity=1,
Str=<1!P(L)>,
Cpr=1,
- Unf=Unf{Src=InlineStable, TopLvl=True, Value=True, ConLike=True,
+ Unf=Unf{Src=StableSystem, TopLvl=True, Value=True, ConLike=True,
WorkFree=True, Expandable=True,
Guidance=ALWAYS_IF(arity=1,unsat_ok=True,boring_ok=False)
Tmpl= \ (n [Occ=Once1!] :: Int) ->