summaryrefslogtreecommitdiff
path: root/testsuite/tests/simplCore
diff options
context:
space:
mode:
authorBen Gamari <bgamari.foss@gmail.com>2015-09-23 13:10:13 -0500
committerAustin Seipp <austin@well-typed.com>2015-09-23 13:11:04 -0500
commitcf90a1e14efb900f94a3824b242be1c38b16a563 (patch)
treeeeef9c818f20cee8b0f75083bdf2cb201f525449 /testsuite/tests/simplCore
parent939a7d6367501d43be73f4e41db7395af1194989 (diff)
downloadhaskell-cf90a1e14efb900f94a3824b242be1c38b16a563.tar.gz
Add constant-folding rule for Data.Bits.bit
This adds a constant-folding rule for `Integer`'s implementation of `bit` and fixes the `T8832` testcase. Fixes #8832. Reviewed By: simonpj, austin Differential Revision: https://phabricator.haskell.org/D1255 GHC Trac Issues: #8832
Diffstat (limited to 'testsuite/tests/simplCore')
-rw-r--r--testsuite/tests/simplCore/should_compile/Makefile2
-rw-r--r--testsuite/tests/simplCore/should_compile/T8832.stdout21
-rw-r--r--testsuite/tests/simplCore/should_compile/all.T2
3 files changed, 13 insertions, 12 deletions
diff --git a/testsuite/tests/simplCore/should_compile/Makefile b/testsuite/tests/simplCore/should_compile/Makefile
index 7f43dafdc8..8c6ec45796 100644
--- a/testsuite/tests/simplCore/should_compile/Makefile
+++ b/testsuite/tests/simplCore/should_compile/Makefile
@@ -4,7 +4,7 @@ include $(TOP)/mk/test.mk
T8832:
$(RM) -f T8832.o T8832.hi
- '$(TEST_HC)' $(TEST_HC_OPTS) $(T8832_WORDSIZE_OPTS) -O -c -ddump-simpl T8832.hs | grep '#'
+ '$(TEST_HC)' $(TEST_HC_OPTS) $(T8832_WORDSIZE_OPTS) -O -c -ddump-simpl T8832.hs | grep '^[a-zA-Z0-9]\+ ='
T8274:
$(RM) -f T8274.o T8274.hi
diff --git a/testsuite/tests/simplCore/should_compile/T8832.stdout b/testsuite/tests/simplCore/should_compile/T8832.stdout
index 9c10451669..a351735cd0 100644
--- a/testsuite/tests/simplCore/should_compile/T8832.stdout
+++ b/testsuite/tests/simplCore/should_compile/T8832.stdout
@@ -1,10 +1,11 @@
-i = GHC.Types.I# 0#
-i8 = GHC.Int.I8# 0#
-i16 = GHC.Int.I16# 0#
-i32 = GHC.Int.I32# 0#
-i64 = GHC.Int.I64# 0#
-w = GHC.Types.W# 0##
-w8 = GHC.Word.W8# 0##
-w16 = GHC.Word.W16# 0##
-w32 = GHC.Word.W32# 0##
-w64 = GHC.Word.W64# 0##
+i = I# 0#
+i8 = I8# 0#
+i16 = I16# 0#
+i32 = I32# 0#
+i64 = I64# 0#
+w = W# 0##
+w8 = W8# 0##
+w16 = W16# 0##
+w32 = W32# 0##
+w64 = W64# 0##
+z = 0
diff --git a/testsuite/tests/simplCore/should_compile/all.T b/testsuite/tests/simplCore/should_compile/all.T
index b337c9c170..c99b8f2bab 100644
--- a/testsuite/tests/simplCore/should_compile/all.T
+++ b/testsuite/tests/simplCore/should_compile/all.T
@@ -202,7 +202,7 @@ test('T5996',
['$MAKE -s --no-print-directory T5996'])
test('T8537', normal, compile, [''])
test('T8832',
- expect_broken(8832),
+ normal,
run_command,
['$MAKE -s --no-print-directory T8832 T8832_WORDSIZE_OPTS=' +
('-DT8832_WORDSIZE_64' if wordsize(64) else '')])