diff options
author | Ben Gamari <ben@smart-cactus.org> | 2017-11-22 14:27:55 -0500 |
---|---|---|
committer | Ben Gamari <ben@smart-cactus.org> | 2017-11-22 14:27:55 -0500 |
commit | 341013e24764cb7fc95169fddcda1bdb02434bb6 (patch) | |
tree | e77842663394b0c3cfdd5a1cd04e24d94590edcf /testsuite | |
parent | abdb5559b74af003a6d85f32695c034ff739f508 (diff) | |
download | haskell-341013e24764cb7fc95169fddcda1bdb02434bb6.tar.gz |
Revert "Add new mbmi and mbmi2 compiler flags"
This broke the 32-bit build.
This reverts commit f5dc8ccc29429d0a1d011f62b6b430f6ae50290c.
Diffstat (limited to 'testsuite')
-rw-r--r-- | testsuite/tests/codeGen/should_run/all.T | 2 | ||||
-rw-r--r-- | testsuite/tests/codeGen/should_run/cgrun075.hs | 115 | ||||
-rw-r--r-- | testsuite/tests/codeGen/should_run/cgrun075.stdout | 6 | ||||
-rw-r--r-- | testsuite/tests/codeGen/should_run/cgrun076.hs | 115 | ||||
-rw-r--r-- | testsuite/tests/codeGen/should_run/cgrun076.stdout | 6 |
5 files changed, 0 insertions, 244 deletions
diff --git a/testsuite/tests/codeGen/should_run/all.T b/testsuite/tests/codeGen/should_run/all.T index 42d8a2f767..214a9d5704 100644 --- a/testsuite/tests/codeGen/should_run/all.T +++ b/testsuite/tests/codeGen/should_run/all.T @@ -77,8 +77,6 @@ test('cgrun069', omit_ways(['ghci']), multi_compile_and_run, test('cgrun070', normal, compile_and_run, ['']) test('cgrun071', normal, compile_and_run, ['']) test('cgrun072', normal, compile_and_run, ['']) -test('cgrun075', normal, compile_and_run, ['']) -test('cgrun076', normal, compile_and_run, ['']) test('T1852', normal, compile_and_run, ['']) test('T1861', extra_run_opts('0'), compile_and_run, ['']) diff --git a/testsuite/tests/codeGen/should_run/cgrun075.hs b/testsuite/tests/codeGen/should_run/cgrun075.hs deleted file mode 100644 index 09e35b4d8a..0000000000 --- a/testsuite/tests/codeGen/should_run/cgrun075.hs +++ /dev/null @@ -1,115 +0,0 @@ -{-# LANGUAGE BangPatterns, CPP, MagicHash #-} - -module Main ( main ) where - -import Data.Bits -import GHC.Int -import GHC.Prim -import GHC.Word -import Data.Int -import Data.Word - -#include "MachDeps.h" - -main = putStr - ( test_pdep ++ "\n" - ++ test_pdep8 ++ "\n" - ++ test_pdep16 ++ "\n" - ++ test_pdep32 ++ "\n" - ++ test_pdep64 ++ "\n" - ++ "\n" - ) - -class Pdep a where - pdep :: a -> a -> a - -instance Pdep Word where - pdep (W# src#) (W# mask#) = W# (pdep# src# mask#) - -instance Pdep Word8 where - pdep (W8# src#) (W8# mask#) = W8# (pdep8# src# mask#) - -instance Pdep Word16 where - pdep (W16# src#) (W16# mask#) = W16# (pdep16# src# mask#) - -instance Pdep Word32 where - pdep (W32# src#) (W32# mask#) = W32# (pdep32# src# mask#) - -instance Pdep Word64 where - pdep (W64# src#) (W64# mask#) = W64# (pdep64# src# mask#) - -class SlowPdep a where - slowPdep :: a -> a -> a - -instance SlowPdep Word where - slowPdep s m = fromIntegral (slowPdep64 (fromIntegral s) (fromIntegral m)) - -instance SlowPdep Word8 where - slowPdep s m = fromIntegral (slowPdep64 (fromIntegral s) (fromIntegral m)) - -instance SlowPdep Word16 where - slowPdep s m = fromIntegral (slowPdep64 (fromIntegral s) (fromIntegral m)) - -instance SlowPdep Word32 where - slowPdep s m = fromIntegral (slowPdep64 (fromIntegral s) (fromIntegral m)) - -instance SlowPdep Word64 where - slowPdep s m = fromIntegral (slowPdep64 (fromIntegral s) (fromIntegral m)) - -slowPdep64 :: Word64 -> Word64 -> Word64 -slowPdep64 = slowPdep64' 0 - -slowPdep32 :: Word32 -> Word32 -> Word32 -slowPdep32 s m = fromIntegral (slowPdep64 (fromIntegral s) (fromIntegral m)) - -lsb :: Word64 -> Word64 -lsb src = fromIntegral ((fromIntegral (src `shiftL` 63) :: Int64) `shiftR` 63) - -slowPdep64' :: Word64 -> Word64 -> Word64 -> Word64 -slowPdep64' result src mask = if lowest /= 0 - then slowPdep64' newResult (src `shiftR` 1) (mask .&. complement lowest) - else result - where lowest = (-mask) .&. mask - newResult = (result .|. ((lsb src) .&. lowest)) - -test_pdep = test (0 :: Word ) pdep slowPdep -test_pdep8 = test (0 :: Word8 ) pdep slowPdep -test_pdep16 = test (0 :: Word16) pdep slowPdep -test_pdep32 = test (0 :: Word32) pdep slowPdep -test_pdep64 = test (0 :: Word64) pdep slowPdep - -mask n = (2 ^ n) - 1 - -fst4 :: (a, b, c, d) -> a -fst4 (a, _, _, _) = a - -runCase :: Eq a - => (a -> a -> a) - -> (a -> a -> a) - -> (a, a) - -> (Bool, a, a, (a, a)) -runCase fast slow (x, y) = (slow x y == fast x y, slow x y, fast x y, (x, y)) - -test :: (Show a, Num a, Eq a) => a -> (a -> a -> a) -> (a -> a -> a) -> String -test _ fast slow = case failing of - [] -> "OK" - ((_, e, a, i):xs) -> - "FAIL\n" ++ " Input: " ++ show i ++ "\nExpected: " ++ show e ++ - "\n Actual: " ++ show a - where failing = dropWhile fst4 . map (runCase fast slow) $ cases - cases = (,) <$> numbers <*> numbers - -- 10 random numbers -#if SIZEOF_HSWORD == 4 - numbers = [ 1480294021, 1626858410, 2316287658, 1246556957, 3806579062 - , 65945563 , 1521588071, 791321966 , 1355466914, 2284998160 - ] -#elif SIZEOF_HSWORD == 8 - numbers = [ 11004539497957619752, 5625461252166958202 - , 1799960778872209546 , 16979826074020750638 - , 12789915432197771481, 11680809699809094550 - , 13208678822802632247, 13794454868797172383 - , 13364728999716654549, 17516539991479925226 - ] -#else -# error Unexpected word size -#endif diff --git a/testsuite/tests/codeGen/should_run/cgrun075.stdout b/testsuite/tests/codeGen/should_run/cgrun075.stdout deleted file mode 100644 index e22e2cd950..0000000000 --- a/testsuite/tests/codeGen/should_run/cgrun075.stdout +++ /dev/null @@ -1,6 +0,0 @@ -OK -OK -OK -OK -OK - diff --git a/testsuite/tests/codeGen/should_run/cgrun076.hs b/testsuite/tests/codeGen/should_run/cgrun076.hs deleted file mode 100644 index 7fa42d74e0..0000000000 --- a/testsuite/tests/codeGen/should_run/cgrun076.hs +++ /dev/null @@ -1,115 +0,0 @@ -{-# LANGUAGE BangPatterns, CPP, MagicHash #-} - -module Main ( main ) where - -import Data.Bits -import GHC.Int -import GHC.Prim -import GHC.Word -import Data.Int -import Data.Word - -#include "MachDeps.h" - -main = putStr - ( test_pext ++ "\n" - ++ test_pext8 ++ "\n" - ++ test_pext16 ++ "\n" - ++ test_pext32 ++ "\n" - ++ test_pext64 ++ "\n" - ++ "\n" - ) - -class Pext a where - pext :: a -> a -> a - -instance Pext Word where - pext (W# src#) (W# mask#) = W# (pext# src# mask#) - -instance Pext Word8 where - pext (W8# src#) (W8# mask#) = W8# (pext8# src# mask#) - -instance Pext Word16 where - pext (W16# src#) (W16# mask#) = W16# (pext16# src# mask#) - -instance Pext Word32 where - pext (W32# src#) (W32# mask#) = W32# (pext32# src# mask#) - -instance Pext Word64 where - pext (W64# src#) (W64# mask#) = W64# (pext64# src# mask#) - -class SlowPext a where - slowPext :: a -> a -> a - -instance SlowPext Word where - slowPext s m = fromIntegral (slowPext64 (fromIntegral s) (fromIntegral m)) - -instance SlowPext Word8 where - slowPext s m = fromIntegral (slowPext64 (fromIntegral s) (fromIntegral m)) - -instance SlowPext Word16 where - slowPext s m = fromIntegral (slowPext64 (fromIntegral s) (fromIntegral m)) - -instance SlowPext Word32 where - slowPext s m = fromIntegral (slowPext64 (fromIntegral s) (fromIntegral m)) - -instance SlowPext Word64 where - slowPext s m = fromIntegral (slowPext64 (fromIntegral s) (fromIntegral m)) - -slowPext64 :: Word64 -> Word64 -> Word64 -slowPext64 = slowPext64' 0 0 0 - -slowPext32 :: Word32 -> Word32 -> Word32 -slowPext32 s m = fromIntegral (slowPext64 (fromIntegral s) (fromIntegral m)) - -slowPext64' :: Word64 -> Int -> Int -> Word64 -> Word64 -> Word64 -slowPext64' result offset index src mask = if index /= 64 - then if maskBit /= 0 - then slowPext64' nextResult (offset + 1) (index + 1) src mask - else slowPext64' result offset (index + 1) src mask - else result - where srcBit = (src `shiftR` index) .&. 1 - maskBit = (mask `shiftR` index) .&. 1 - nextResult = result .|. (srcBit `shiftL` offset) - -test_pext = test (0 :: Word ) pext slowPext -test_pext8 = test (0 :: Word8 ) pext slowPext -test_pext16 = test (0 :: Word16) pext slowPext -test_pext32 = test (0 :: Word32) pext slowPext -test_pext64 = test (0 :: Word64) pext slowPext - -mask n = (2 ^ n) - 1 - -fst4 :: (a, b, c, d) -> a -fst4 (a, _, _, _) = a - -runCase :: Eq a - => (a -> a -> a) - -> (a -> a -> a) - -> (a, a) - -> (Bool, a, a, (a, a)) -runCase fast slow (x, y) = (slow x y == fast x y, slow x y, fast x y, (x, y)) - -test :: (Show a, Num a, Eq a) => a -> (a -> a -> a) -> (a -> a -> a) -> String -test _ fast slow = case failing of - [] -> "OK" - ((_, e, a, i):xs) -> - "FAIL\n" ++ " Input: " ++ show i ++ "\nExpected: " ++ show e ++ - "\n Actual: " ++ show a - where failing = dropWhile fst4 . map (runCase fast slow) $ cases - cases = (,) <$> numbers <*> numbers - -- 10 random numbers -#if SIZEOF_HSWORD == 4 - numbers = [ 1480294021, 1626858410, 2316287658, 1246556957, 3806579062 - , 65945563 , 1521588071, 791321966 , 1355466914, 2284998160 - ] -#elif SIZEOF_HSWORD == 8 - numbers = [ 11004539497957619752, 5625461252166958202 - , 1799960778872209546 , 16979826074020750638 - , 12789915432197771481, 11680809699809094550 - , 13208678822802632247, 13794454868797172383 - , 13364728999716654549, 17516539991479925226 - ] -#else -# error Unexpected word size -#endif diff --git a/testsuite/tests/codeGen/should_run/cgrun076.stdout b/testsuite/tests/codeGen/should_run/cgrun076.stdout deleted file mode 100644 index e22e2cd950..0000000000 --- a/testsuite/tests/codeGen/should_run/cgrun076.stdout +++ /dev/null @@ -1,6 +0,0 @@ -OK -OK -OK -OK -OK - |