Ticket #8256: testsuite-prefetch-patch.patch

File testsuite-prefetch-patch.patch, 1.7 KB (added by carter, 23 months ago)

testsuite patch sept 17 4pm

  • new file tests/codeGen/should_compile/T8256.hs

    From d69cc2f3b78cac6b49aaa41ea5eb7f47ff344de3 Mon Sep 17 00:00:00 2001
    From: Carter Tazio Schonwald <[email protected]>
    Date: Tue, 17 Sep 2013 15:57:20 -0400
    Subject: [PATCH] adding prefetch test for compiler
    
    ---
     tests/codeGen/should_compile/T8256.hs | 28 ++++++++++++++++++++++++++++
     tests/codeGen/should_compile/all.T    |  2 ++
     2 files changed, 30 insertions(+)
     create mode 100644 tests/codeGen/should_compile/T8256.hs
    
    diff --git a/tests/codeGen/should_compile/T8256.hs b/tests/codeGen/should_compile/T8256.hs
    new file mode 100644
    index 0000000..551ca51
    - +  
     1{-# LANGUAGE MagicHash, UnboxedTuples #-}
     2
     3module PrefetchTest where
     4
     5import GHC.Prim
     6
     7import Data.Vector.Storable.Mutable
     8-- import Foreign.ForeignPtr -- (unsafeForeignPtrToPtr)
     9import Foreign.Ptr
     10import GHC.ST
     11
     12
     13t1 = prefetchMutableByteArray0#
     14
     15t2 = prefetchAddr0#
     16
     17-- prefetchMutableByteArray0#
     18  -- :: MutableByteArray# d -> Int# -> State# d -> State# d
     19wrappedPrfetchMB :: MutableByteArray# s -> Int# -> ST s ()
     20wrappedPrfetchMB mar ix = ST $ \ s ->
     21        case (prefetchMutableByteArray0# mar ix s) of
     22           s -> (# s, () #)
     23
     24-- main =
     25--     do
     26--         vectT <- replicate 10 (0:: Int )
     27
     28
  • tests/codeGen/should_compile/all.T

    diff --git a/tests/codeGen/should_compile/all.T b/tests/codeGen/should_compile/all.T
    index 679bc94..8fb91ab 100644
    a b test('massive_array', 
    2222test('T7237', normal, compile, [''])
    2323test('T7574', [cmm_src, expect_broken(7574), omit_ways(['llvm', 'optllvm'])], compile, [''])
    2424test('T8205', normal, compile, ['-O0'])
     25
     26test('T8256',normal, compile, [''])