Commit 244412b2 authored by Gabor Greif's avatar Gabor Greif 💬

add test for exhibiting the double switch scheme

parent 23fa9dd6
Pipeline #10420 failed with stages
in 53 seconds
data BigFam = A | B | C | D | E | F | G | H | I | J | K | L | M | N | O | P
{-# NOINLINE mixedSwitch #-}
mixedSwitch A = True
mixedSwitch B = False
mixedSwitch C = False
mixedSwitch P = True
main = print $ mixedSwitch B
switch [1 .. 7]
case 1 : goto
case 2 : goto
case 3 : goto
case 7 : goto
default: {goto
switch [6 .. 15]
case 15 : goto
default: {goto
......@@ -65,9 +65,15 @@ test('T16449_1', normal, compile, [''])
test('T14373', [],
multimod_compile_filter, ['T14373', '-fasm -O2 -c -ddump-cmm-from-stg -dsuppress-uniques',
'grep -e "const T14373\.._closure+.;"'])
switch_skeleton_only : str = 'grep -e "switch \[" -e "case " -e "default: " | sed -e "s|\] .*|\]|g" -e "s|goto .*|goto |g"'
test('T14373a', [],
multimod_compile_filter, ['T14373a', '-fasm -O2 -ddump-cmm-from-stg -dsuppress-uniques',
'grep -e "switch \[" -e "case " -e "default: " | sed -e "s|\] .*|\]|g" -e "s|goto .*|goto |g"'])
switch_skeleton_only])
test('T14373b', [],
multimod_compile_filter, ['T14373b', '-fasm -O2 -ddump-cmm-from-stg -dsuppress-uniques',
'grep -e "switch \[" -e "case " -e "default: " | sed -e "s|\] .*|\]|g" -e "s|goto .*|goto |g"'])
switch_skeleton_only])
test('T14373c', [],
multimod_compile_filter, ['T14373c', '-fasm -O2 -ddump-cmm-from-stg -dsuppress-uniques',
switch_skeleton_only])
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment