[commit: ghc] wip/T14626: Test the absence of re-tagging (9ad6982)

git at git.haskell.org git at git.haskell.org
Wed Jan 3 17:41:35 UTC 2018


Repository : ssh://git@git.haskell.org/ghc

On branch  : wip/T14626
Link       : http://ghc.haskell.org/trac/ghc/changeset/9ad6982e4074c1fdeff967cafa51e436023d69bb/ghc

>---------------------------------------------------------------

commit 9ad6982e4074c1fdeff967cafa51e436023d69bb
Author: Gabor Greif <ggreif at gmail.com>
Date:   Wed Jan 3 18:40:19 2018 +0100

    Test the absence of re-tagging


>---------------------------------------------------------------

9ad6982e4074c1fdeff967cafa51e436023d69bb
 testsuite/tests/codeGen/should_compile/Makefile      | 4 ++++
 testsuite/tests/codeGen/should_compile/T14626.hs     | 7 +++++++
 testsuite/tests/codeGen/should_compile/T14626.stdout | 3 +++
 3 files changed, 14 insertions(+)

diff --git a/testsuite/tests/codeGen/should_compile/Makefile b/testsuite/tests/codeGen/should_compile/Makefile
index a841438..eaad461 100644
--- a/testsuite/tests/codeGen/should_compile/Makefile
+++ b/testsuite/tests/codeGen/should_compile/Makefile
@@ -7,6 +7,10 @@ T2578:
 
 T14626:
 	'$(TEST_HC)' $(TEST_HC_OPTS) -c -O -ddump-prep -dsuppress-uniques T14626.hs | grep case
+	echo == CMM ==
+  # we don't want to see re-tagging, like: R1 = R1 & (-8);
+	- '$(TEST_HC)' $(TEST_HC_OPTS) -c -O -ddump-cmm -dsuppress-uniques -fforce-recomp T14626.hs | grep 'R1 = R1 & (-[48])'
+	echo == /CMM ==
 
 debug:
 	# Without optimisations, we should get annotations for basically
diff --git a/testsuite/tests/codeGen/should_compile/T14626.hs b/testsuite/tests/codeGen/should_compile/T14626.hs
index a665694..76c7e2e 100644
--- a/testsuite/tests/codeGen/should_compile/T14626.hs
+++ b/testsuite/tests/codeGen/should_compile/T14626.hs
@@ -13,3 +13,10 @@ f v = case v of
 --    f v = case v of
 --            MkT y -> case y of z -> dataToTag# z
 -- But it was!  See Trac #14626 comment:4
+
+
+data Letters = A | B | C | D | E | F
+
+consonant A = B
+consonant E = C
+consonant other = other
diff --git a/testsuite/tests/codeGen/should_compile/T14626.stdout b/testsuite/tests/codeGen/should_compile/T14626.stdout
index 31e280e..35803ee 100644
--- a/testsuite/tests/codeGen/should_compile/T14626.stdout
+++ b/testsuite/tests/codeGen/should_compile/T14626.stdout
@@ -1,2 +1,5 @@
       case dt of dt { __DEFAULT -> T14626.MkT dt }
       case v of { T14626.MkT y [Occ=Once] ->
+      case ds of wild {
+== CMM ==
+== /CMM ==



More information about the ghc-commits mailing list