Follow changes in comparison primops (see #6135)
[ghc.git] / testsuite / tests / simplCore / should_compile / Makefile
1 TOP=../../..
2 include $(TOP)/mk/boilerplate.mk
3 include $(TOP)/mk/test.mk
4
5 T7865:
6 $(RM) -f T7865.o T7865.hi
7 '$(TEST_HC)' $(TEST_HC_OPTS) -dsuppress-uniques -O2 -c -ddump-simpl T7865.hs | grep expensive
8
9 T3055:
10 $(RM) -f T3055.o T3055.hi T3055.simpl
11 '$(TEST_HC)' $(TEST_HC_OPTS) -O -c T3055.hs -ddump-simpl > T3055.simpl
12 grep 'I# (-28)' T3055.simpl | sed 's/.*\(I# (-28)\).*/\1/'
13
14 T5658b:
15 $(RM) -f T5658b.o T5658b.hi
16 '$(TEST_HC)' $(TEST_HC_OPTS) -O -c T5658b.hs -ddump-simpl | grep --count indexIntArray
17 # Trac 5658 meant that there were three calls to indexIntArray instead of two
18
19 T5776:
20 $(RM) -f T5776.o T5776.hi
21 '$(TEST_HC)' $(TEST_HC_OPTS) -O -c T5776.hs -ddump-rules | grep --count dEq
22
23 T3772:
24 $(RM) -f T3772*.hi T3772*.o
25 '$(TEST_HC)' $(TEST_HC_OPTS) -c -O T3772_A.hs
26 '$(TEST_HC)' $(TEST_HC_OPTS) -c -O T3772.hs -dsuppress-uniques -ddump-simpl
27
28 T4306:
29 $(RM) -f T4306.hi T4306.o
30 '$(TEST_HC)' $(TEST_HC_OPTS) -c -O T4306.hs
31 '$(TEST_HC)' $(TEST_HC_OPTS) --show-iface T4306.hi | grep 'wupd ::'
32
33 T4201:
34 $(RM) -f T4201.hi T4201.o
35 '$(TEST_HC)' $(TEST_HC_OPTS) -c -O T4201.hs
36 '$(TEST_HC)' $(TEST_HC_OPTS) --show-iface T4201.hi | grep -B2 'Sym'
37
38 # This one looped as a result of bogus specialisation
39 T4903:
40 $(RM) -f T4903.hi T4903a.hi T4903a.o T4903.o
41 '$(TEST_HC)' $(TEST_HC_OPTS) -c -O T4903a.hs -dcore-lint
42 '$(TEST_HC)' $(TEST_HC_OPTS) -c -O T4903.hs -dcore-lint
43
44 T4918:
45 $(RM) -f T4918.hi T4918.o T4918a.hi T4918a.o
46 '$(TEST_HC)' $(TEST_HC_OPTS) -c -O T4918a.hs
47 '$(TEST_HC)' $(TEST_HC_OPTS) -c -O T4918.hs
48 '$(TEST_HC)' $(TEST_HC_OPTS) --show-iface T4918.hi | grep 'C#'
49
50 EvalTest:
51 '$(TEST_HC)' $(TEST_HC_OPTS) -c -O EvalTest.hs -ddump-simpl -dsuppress-uniques | grep 'rght.*Dmd' | sed 's/^ *//'
52
53 T5168:
54 -('$(TEST_HC)' $(TEST_HC_OPTS) -c -O T5168.hs -ddump-simpl -dsuppress-uniques | grep 'patError')
55
56 # When SpecConstr works there are no STUArrays at all
57 # The "-(...)" ignores the (expected) non-zero exit code from grep
58 # when there are (as expected) no matches
59 T4945:
60 -('$(TEST_HC)' $(TEST_HC_OPTS) -c -O2 -fno-liberate-case T4945.hs -ddump-simpl -dsuppress-uniques | grep 'STUArray')
61
62 # When this one works there are no 'lets' at all
63 T4957:
64 -('$(TEST_HC)' $(TEST_HC_OPTS) -c -O T4957.hs -ddump-simpl -dsuppress-uniques | grep 'let')
65
66 .PHONY: simpl021
67 simpl021:
68 $(RM) -f Simpl021A.hi Simpl021A.o Simpl021B.hi Simpl021B.o
69 '$(TEST_HC)' $(TEST_HC_OPTS) -c Simpl021A.hs -O
70 '$(TEST_HC)' $(TEST_HC_OPTS) -c Simpl021B.hs -O
71
72 .PHONY: T5327
73 T5327:
74 $(RM) -f T5327.hi T5327.o
75 '$(TEST_HC)' $(TEST_HC_OPTS) -c T5327.hs -O -ddump-simpl | grep -c 'GHC.Prim.># 34 '
76
77 .PHONY: T5623
78 T5623:
79 $(RM) -f T5623.hi T5623.o
80 '$(TEST_HC)' $(TEST_HC_OPTS) -c T5623.hs -O -ddump-prep | grep -c "plusAddr#"
81
82 .PHONY: T4138
83 T4138:
84 $(RM) -f T4138.hi T4138.o
85 $(RM) -f T4138_A.hi T4138_A.o
86 '$(TEST_HC)' $(TEST_HC_OPTS) -O -c T4138_A.hs
87 '$(TEST_HC)' $(TEST_HC_OPTS) -O -c T4138.hs -ddump-simpl > T4138.simpl
88 grep -c 'F#' T4138.simpl
89
90 T7165:
91 $(RM) -f T7165.hi T7165a.hi T7165a.o T7165.o
92 '$(TEST_HC)' $(TEST_HC_OPTS) -c -O2 T7165a.hs -dcore-lint
93 '$(TEST_HC)' $(TEST_HC_OPTS) -c -O2 T7165.hs -dcore-lint
94
95 T5366:
96 $(RM) -f T5366.hi T5366.o
97 '$(TEST_HC)' $(TEST_HC_OPTS) -ddump-simpl -dsuppress-uniques -c -O T5366.hs | grep 'Bar.*I#'
98
99 # We expect 0 occurrences of ' $sgo' in -ddump-prep. Mind the Makefile
100 # $-escaping. The -grep ignores grep's expected exit code of 1.
101 .PHONY: T7796
102 T7796:
103 '$(TEST_HC)' $(TEST_HC_OPTS) -O1 -c T7796.hs -ddump-prep > T7796.prep
104 (grep -q '$$w$$sgo' T7796.prep || echo 'could not find $$w$$sgo; compilation was not as expected')
105 -grep -c ' $$sgo' T7796.prep
106
107 T7995:
108 $(RM) -f T7995.hi T7995.o
109 '$(TEST_HC)' $(TEST_HC_OPTS) -package ghc -ddump-rule-firings -c -O T7995.hs | grep 'text/str'
110
111 T8221:
112 '$(TEST_HC)' $(TEST_HC_OPTS) -c -O -fforce-recomp T8221a.hs
113 '$(TEST_HC)' $(TEST_HC_OPTS) -c -O -fforce-recomp T8221.hs