[commit: ghc] master: Fix trac #10647: Notice about lack of SIMD support (f12fb8a)

git at git.haskell.org git at git.haskell.org
Sat Jun 18 22:23:30 UTC 2016


Repository : ssh://git@git.haskell.org/ghc

On branch  : master
Link       : http://ghc.haskell.org/trac/ghc/changeset/f12fb8ab5d5ad7a26c84f98e446bc70064dcdcec/ghc

>---------------------------------------------------------------

commit f12fb8ab5d5ad7a26c84f98e446bc70064dcdcec
Author: Seraphime Kirkovski <kirkseraph at gmail.com>
Date:   Sat Jun 18 12:28:19 2016 +0200

    Fix trac #10647: Notice about lack of SIMD support
    
    Fixes #10647. Changes the error message when a SIMD size
    variable is required in the native code generation backend.
    
    Test Plan:
    Try compiling the test case given in the ticket :
    
    {-# LANGUAGE MagicHash #-}
    module Foo where
    import GHC.Prim
    data V = V Int8X16#
    
    GHC should give a clearer error message
    
    Reviewers: austin, bgamari
    
    Reviewed By: bgamari
    
    Subscribers: thomie
    
    Differential Revision: https://phabricator.haskell.org/D2325
    
    GHC Trac Issues: #10647


>---------------------------------------------------------------

f12fb8ab5d5ad7a26c84f98e446bc70064dcdcec
 compiler/nativeGen/Format.hs | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/compiler/nativeGen/Format.hs b/compiler/nativeGen/Format.hs
index 92a8ef8..00811f1 100644
--- a/compiler/nativeGen/Format.hs
+++ b/compiler/nativeGen/Format.hs
@@ -57,7 +57,9 @@ intFormat width
         W16     -> II16
         W32     -> II32
         W64     -> II64
-        other   -> pprPanic "Format.intFormat" (ppr other)
+        other   -> sorry $ "The native code generator cannot " ++
+            "produce code for Format.intFormat " ++ show other
+            ++ "\n\tConsider using the llvm backend with -fllvm"
 
 
 -- | Get the float format of this width.



More information about the ghc-commits mailing list