diff options
Diffstat (limited to 'testsuite/tests/codeGen/should_compile/T2388.hs')
-rw-r--r-- | testsuite/tests/codeGen/should_compile/T2388.hs | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/testsuite/tests/codeGen/should_compile/T2388.hs b/testsuite/tests/codeGen/should_compile/T2388.hs new file mode 100644 index 0000000000..f3364f5b6e --- /dev/null +++ b/testsuite/tests/codeGen/should_compile/T2388.hs @@ -0,0 +1,14 @@ +module Q where + +import Data.Bits +import Data.Word +import Data.Int + +test1 :: Word32 -> Char +test1 w | w .&. 0x80000000 /= 0 = 'a' +test1 _ = 'b' + +-- this should use a testq instruction on x86_64 +test2 :: Int64 -> Char +test2 w | w .&. (-3) /= 0 = 'a' +test2 _ = 'b' |