[commit: ghc] master: IcmmMachOpFoldM: clarify panic message (594123f)
git at git.haskell.org
git at git.haskell.org
Sat Feb 11 13:12:36 UTC 2017
Repository : ssh://git@git.haskell.org/ghc
On branch : master
Link : http://ghc.haskell.org/trac/ghc/changeset/594123f57779464c9b7c0f51445639e15b8bd55c/ghc
>---------------------------------------------------------------
commit 594123f57779464c9b7c0f51445639e15b8bd55c
Author: Sergei Trofimovich <slyfox at gentoo.org>
Date: Sat Feb 11 13:05:24 2017 +0000
IcmmMachOpFoldM: clarify panic message
When adding a new primop cinimod noticed
uninformative ghc panic:
cmmMachOpFoldM: unknown unary op
This change tweaks panic to contain the op:
cmmMachOpFoldM: unknown unary op: MO_F_Neg W64
Signed-off-by: Sergei Trofimovich <slyfox at gentoo.org>
>---------------------------------------------------------------
594123f57779464c9b7c0f51445639e15b8bd55c
compiler/cmm/CmmOpt.hs | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/compiler/cmm/CmmOpt.hs b/compiler/cmm/CmmOpt.hs
index 8d1641a..38c399e 100644
--- a/compiler/cmm/CmmOpt.hs
+++ b/compiler/cmm/CmmOpt.hs
@@ -79,7 +79,7 @@ cmmMachOpFoldM _ op [CmmLit (CmmInt x rep)]
MO_SS_Conv from to -> CmmLit (CmmInt (narrowS from x) to)
MO_UU_Conv from to -> CmmLit (CmmInt (narrowU from x) to)
- _ -> panic "cmmMachOpFoldM: unknown unary op"
+ _ -> panic $ "cmmMachOpFoldM: unknown unary op: " ++ show op
-- Eliminate conversion NOPs
More information about the ghc-commits
mailing list