Follow changes in comparison primops (see #6135)
[ghc.git] / testsuite / tests / simplCore / should_compile / T5658b.hs
1 {-# LANGUAGE MagicHash, BangPatterns #-}
2 module T5658b where
3 import GHC.Prim
4 import GHC.Exts ( isTrue# )
5
6 foo :: ByteArray# -> ByteArray# -> Int# -> Int# -> Bool
7 foo xs ys m n = go 0# 0#
8 where
9 go i j = case isTrue# (i >=# m) of
10 False -> let !x = indexIntArray# xs i in
11 case isTrue# (j >=# n) of
12 False -> case isTrue# (x ==# indexIntArray# ys j) of
13 False -> False
14 True -> go (i +# 1#) (j +# 1#)
15 True -> False
16 True -> case isTrue# (j >=# n) of
17 False -> let !y = indexIntArray# ys i in False
18 True -> True