From 81560981fd9af7ea21b2592c405e9e22af838aab Mon Sep 17 00:00:00 2001 From: Sylvain Henry Date: Tue, 3 Nov 2020 12:41:09 +0100 Subject: Don't use LEA with 8-bit registers (#18614) --- testsuite/tests/codeGen/should_compile/T18614.hs | 11 +++++++++++ testsuite/tests/codeGen/should_compile/all.T | 2 ++ 2 files changed, 13 insertions(+) create mode 100644 testsuite/tests/codeGen/should_compile/T18614.hs (limited to 'testsuite/tests/codeGen') 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, ['']) -- cgit v1.2.1