diff options
author | Sylvain Henry <sylvain@haskus.fr> | 2020-11-03 12:41:09 +0100 |
---|---|---|
committer | Marge Bot <ben+marge-bot@smart-cactus.org> | 2020-11-04 16:48:42 -0500 |
commit | 81560981fd9af7ea21b2592c405e9e22af838aab (patch) | |
tree | 9c6abd5b4b85f0990581567ef2f28d147d5601a7 /testsuite/tests/codeGen | |
parent | b790b7f91104197429cd80e2c192a6fcda9dd6b4 (diff) | |
download | haskell-81560981fd9af7ea21b2592c405e9e22af838aab.tar.gz |
Don't use LEA with 8-bit registers (#18614)
Diffstat (limited to 'testsuite/tests/codeGen')
-rw-r--r-- | testsuite/tests/codeGen/should_compile/T18614.hs | 11 | ||||
-rw-r--r-- | testsuite/tests/codeGen/should_compile/all.T | 2 |
2 files changed, 13 insertions, 0 deletions
diff --git a/testsuite/tests/codeGen/should_compile/T18614.hs b/testsuite/tests/codeGen/should_compile/T18614.hs new file mode 100644 index 0000000000..ae055e3cfd --- /dev/null +++ b/testsuite/tests/codeGen/should_compile/T18614.hs @@ -0,0 +1,11 @@ +{-# LANGUAGE MagicHash, UnboxedTuples #-} +{-# OPTIONS_GHC -O #-} + +module Main where + +import GHC.Exts + +main = pure () + +test :: Word8# -> Word8# +test x = x `plusWord8#` narrowWord8# 1## diff --git a/testsuite/tests/codeGen/should_compile/all.T b/testsuite/tests/codeGen/should_compile/all.T index cb61b2b44c..0e89b1d82c 100644 --- a/testsuite/tests/codeGen/should_compile/all.T +++ b/testsuite/tests/codeGen/should_compile/all.T @@ -101,3 +101,5 @@ test('T15570', compile, ['-Wno-overflowed-literals']) # skipped with CmmToC because it generates a warning: # warning: integer constant is so large that it is unsigned + +test('T18614', normal, compile, ['']) |