summaryrefslogtreecommitdiff
path: root/testsuite/tests/simplCore
diff options
context:
space:
mode:
authorJan Stolarek <jan.stolarek@p.lodz.pl>2013-09-16 15:15:59 +0100
committerJan Stolarek <jan.stolarek@p.lodz.pl>2013-09-18 14:19:47 +0100
commit4a9f2162380bc57842945f219e88cf9778c2c0df (patch)
treeb003129f3604498fc9c9685b7a3d01255d24faf0 /testsuite/tests/simplCore
parenteca30442817caebab0adee66594cec5316538dd0 (diff)
downloadhaskell-4a9f2162380bc57842945f219e88cf9778c2c0df.tar.gz
Follow changes in comparison primops (see #6135)
Diffstat (limited to 'testsuite/tests/simplCore')
-rw-r--r--testsuite/tests/simplCore/should_compile/Makefile2
-rw-r--r--testsuite/tests/simplCore/should_compile/T3772.stdout5
-rw-r--r--testsuite/tests/simplCore/should_compile/T4930.stderr4
-rw-r--r--testsuite/tests/simplCore/should_compile/T5658b.hs10
-rw-r--r--testsuite/tests/simplCore/should_compile/spec-inline.stderr14
-rw-r--r--testsuite/tests/simplCore/should_run/T5453.hs10
6 files changed, 22 insertions, 23 deletions
diff --git a/testsuite/tests/simplCore/should_compile/Makefile b/testsuite/tests/simplCore/should_compile/Makefile
index c68c135934..f656e4e197 100644
--- a/testsuite/tests/simplCore/should_compile/Makefile
+++ b/testsuite/tests/simplCore/should_compile/Makefile
@@ -72,7 +72,7 @@ simpl021:
.PHONY: T5327
T5327:
$(RM) -f T5327.hi T5327.o
- '$(TEST_HC)' $(TEST_HC_OPTS) -c T5327.hs -O -ddump-simpl | grep -c 'GHC.Prim.>$$# 34 '
+ '$(TEST_HC)' $(TEST_HC_OPTS) -c T5327.hs -O -ddump-simpl | grep -c 'GHC.Prim.># 34 '
.PHONY: T5623
T5623:
diff --git a/testsuite/tests/simplCore/should_compile/T3772.stdout b/testsuite/tests/simplCore/should_compile/T3772.stdout
index e42c76e073..b955e5f8c7 100644
--- a/testsuite/tests/simplCore/should_compile/T3772.stdout
+++ b/testsuite/tests/simplCore/should_compile/T3772.stdout
@@ -7,8 +7,7 @@ xs :: GHC.Prim.Int# -> ()
[GblId, Arity=1, Caf=NoCafRefs, Str=DmdType <L,U>]
xs =
\ (m :: GHC.Prim.Int#) ->
- case GHC.Prim.tagToEnum# @ GHC.Types.Bool (GHC.Prim.<=$# m 1)
- of _ {
+ case GHC.Prim.tagToEnum# @ GHC.Types.Bool (GHC.Prim.<=# m 1) of _ {
GHC.Types.False -> xs (GHC.Prim.-# m 1);
GHC.Types.True -> GHC.Tuple.()
}
@@ -19,7 +18,7 @@ T3772.foo [InlPrag=NOINLINE] :: GHC.Types.Int -> ()
T3772.foo =
\ (n :: GHC.Types.Int) ->
case n of _ { GHC.Types.I# n# ->
- case GHC.Prim.tagToEnum# @ GHC.Types.Bool (GHC.Prim.<=$# n# 0)
+ case GHC.Prim.tagToEnum# @ GHC.Types.Bool (GHC.Prim.<=# n# 0)
of _ {
GHC.Types.False -> xs n#;
GHC.Types.True -> GHC.Tuple.()
diff --git a/testsuite/tests/simplCore/should_compile/T4930.stderr b/testsuite/tests/simplCore/should_compile/T4930.stderr
index fcc1d1c32f..54529900a6 100644
--- a/testsuite/tests/simplCore/should_compile/T4930.stderr
+++ b/testsuite/tests/simplCore/should_compile/T4930.stderr
@@ -19,7 +19,7 @@ T4930.foo :: GHC.Types.Int -> GHC.Types.Int
Guidance=ALWAYS_IF(unsat_ok=True,boring_ok=False)
Tmpl= \ (n [Occ=Once!] :: GHC.Types.Int) ->
case n of _ { GHC.Types.I# x ->
- case GHC.Prim.tagToEnum# @ GHC.Types.Bool (GHC.Prim.<$# x 5) of _ {
+ case GHC.Prim.tagToEnum# @ GHC.Types.Bool (GHC.Prim.<# x 5) of _ {
GHC.Types.False -> GHC.Types.I# (GHC.Prim.+# x 5);
GHC.Types.True -> T4930.foo1
}
@@ -27,7 +27,7 @@ T4930.foo :: GHC.Types.Int -> GHC.Types.Int
T4930.foo =
\ (n :: GHC.Types.Int) ->
case n of _ { GHC.Types.I# x ->
- case GHC.Prim.tagToEnum# @ GHC.Types.Bool (GHC.Prim.<$# x 5) of _ {
+ case GHC.Prim.tagToEnum# @ GHC.Types.Bool (GHC.Prim.<# x 5) of _ {
GHC.Types.False -> GHC.Types.I# (GHC.Prim.+# x 5);
GHC.Types.True -> T4930.foo1
}
diff --git a/testsuite/tests/simplCore/should_compile/T5658b.hs b/testsuite/tests/simplCore/should_compile/T5658b.hs
index 61454a1339..baaea86640 100644
--- a/testsuite/tests/simplCore/should_compile/T5658b.hs
+++ b/testsuite/tests/simplCore/should_compile/T5658b.hs
@@ -1,18 +1,18 @@
{-# LANGUAGE MagicHash, BangPatterns #-}
module T5658b where
import GHC.Prim
-import GHC.PrimWrappers
+import GHC.Exts ( isTrue# )
foo :: ByteArray# -> ByteArray# -> Int# -> Int# -> Bool
foo xs ys m n = go 0# 0#
where
- go i j = case i >=# m of
+ go i j = case isTrue# (i >=# m) of
False -> let !x = indexIntArray# xs i in
- case j >=# n of
- False -> case x ==# indexIntArray# ys j of
+ case isTrue# (j >=# n) of
+ False -> case isTrue# (x ==# indexIntArray# ys j) of
False -> False
True -> go (i +# 1#) (j +# 1#)
True -> False
- True -> case j >=# n of
+ True -> case isTrue# (j >=# n) of
False -> let !y = indexIntArray# ys i in False
True -> True
diff --git a/testsuite/tests/simplCore/should_compile/spec-inline.stderr b/testsuite/tests/simplCore/should_compile/spec-inline.stderr
index a910c041ef..2b6f79616d 100644
--- a/testsuite/tests/simplCore/should_compile/spec-inline.stderr
+++ b/testsuite/tests/simplCore/should_compile/spec-inline.stderr
@@ -24,13 +24,13 @@ Roman.foo_$s$wgo =
(GHC.Prim.+# (GHC.Prim.+# (GHC.Prim.+# sc1 sc1) sc1) sc1) sc1)
sc1)
sc1 } in
- case GHC.Prim.tagToEnum# @ GHC.Types.Bool (GHC.Prim.<=$# sc 0)
+ case GHC.Prim.tagToEnum# @ GHC.Types.Bool (GHC.Prim.<=# sc 0)
of _ {
GHC.Types.False ->
- case GHC.Prim.tagToEnum# @ GHC.Types.Bool (GHC.Prim.<$# sc 100)
+ case GHC.Prim.tagToEnum# @ GHC.Types.Bool (GHC.Prim.<# sc 100)
of _ {
GHC.Types.False ->
- case GHC.Prim.tagToEnum# @ GHC.Types.Bool (GHC.Prim.<$# sc 500)
+ case GHC.Prim.tagToEnum# @ GHC.Types.Bool (GHC.Prim.<# sc 500)
of _ {
GHC.Types.False ->
Roman.foo_$s$wgo (GHC.Prim.-# sc 1) (GHC.Prim.+# a a);
@@ -72,13 +72,13 @@ Roman.$wgo =
Data.Maybe.Nothing -> Roman.foo_$s$wgo 10 a;
Data.Maybe.Just n ->
case n of _ { GHC.Types.I# x2 ->
- case GHC.Prim.tagToEnum# @ GHC.Types.Bool (GHC.Prim.<=$# x2 0)
+ case GHC.Prim.tagToEnum# @ GHC.Types.Bool (GHC.Prim.<=# x2 0)
of _ {
GHC.Types.False ->
- case GHC.Prim.tagToEnum# @ GHC.Types.Bool (GHC.Prim.<$# x2 100)
- of _ {
+ case GHC.Prim.tagToEnum# @ GHC.Types.Bool (GHC.Prim.<# x2 100)
+ of _ {
GHC.Types.False ->
- case GHC.Prim.tagToEnum# @ GHC.Types.Bool (GHC.Prim.<$# x2 500)
+ case GHC.Prim.tagToEnum# @ GHC.Types.Bool (GHC.Prim.<# x2 500)
of _ {
GHC.Types.False ->
Roman.foo_$s$wgo (GHC.Prim.-# x2 1) (GHC.Prim.+# a a);
diff --git a/testsuite/tests/simplCore/should_run/T5453.hs b/testsuite/tests/simplCore/should_run/T5453.hs
index 3ea727fc1d..19a3a3ca86 100644
--- a/testsuite/tests/simplCore/should_run/T5453.hs
+++ b/testsuite/tests/simplCore/should_run/T5453.hs
@@ -11,11 +11,11 @@ data Var = TyVar !Int Bool Bool
scrut :: Var -> (Bool, String)
scrut v = (True, case v of
TcTyVar {} -> "OK"
- _ -> show v ++ show (case (case v of
- TyVar b _ _ -> b
- Var _ _ b -> b) of
- I# x# -> if x# ==# 7#
- then show (I# (x# +# 1#))
+ _ -> show v ++ show (case (case v of
+ TyVar b _ _ -> b
+ Var _ _ b -> b) of
+ I# x# -> if isTrue# (x# ==# 7#)
+ then show (I# (x# +# 1#))
else show (I# (x# +# 2#))))
main = putStrLn $ snd (scrut (TcTyVar True 1 False))