From: Roman Leshchinskiy Date: Sat, 17 Nov 2007 01:50:14 +0000 (+0000) Subject: Fix bug in case vectorisation X-Git-Url: http://git.megacz.com/?a=commitdiff_plain;h=ad7f0a6770d87600130fe4230d4546b340980eb7;p=ghc-hetmet.git Fix bug in case vectorisation --- diff --git a/compiler/vectorise/Vectorise.hs b/compiler/vectorise/Vectorise.hs index 96ed01e..9f2e2b7 100644 --- a/compiler/vectorise/Vectorise.hs +++ b/compiler/vectorise/Vectorise.hs @@ -435,7 +435,9 @@ packLiftingContext len shape tag fvs res_ty p lc_var <- builtin liftingContext localV $ do - bnds <- mapM (packFreeVar (Var lc_var) (Var sel_var)) (varSetElems fvs) + bnds <- mapM (packFreeVar (Var lc_var) (Var sel_var)) + . filter isLocalId + $ varSetElems fvs (vexpr, lexpr) <- p return (vexpr, Let (NonRec sel_var sel_expr) $ Case len lc_var res_ty [(DEFAULT, [], lexpr)])