projects
/
ghc-hetmet.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
FIX #1744: ignore the byte-order mark at the beginning of a file
[ghc-hetmet.git]
/
compiler
/
vectorise
/
VectUtils.hs
diff --git
a/compiler/vectorise/VectUtils.hs
b/compiler/vectorise/VectUtils.hs
index
a540b4d
..
5c099c0
100644
(file)
--- a/
compiler/vectorise/VectUtils.hs
+++ b/
compiler/vectorise/VectUtils.hs
@@
-259,7
+259,7
@@
emptyPA :: Type -> VM CoreExpr
emptyPA = paMethod pa_empty
packPA :: Type -> CoreExpr -> CoreExpr -> CoreExpr -> VM CoreExpr
emptyPA = paMethod pa_empty
packPA :: Type -> CoreExpr -> CoreExpr -> CoreExpr -> VM CoreExpr
-packPA ty xs len sel = liftM (`mkApps` [len, sel])
+packPA ty xs len sel = liftM (`mkApps` [xs, len, sel])
(paMethod pa_pack ty)
combinePA :: Type -> CoreExpr -> CoreExpr -> CoreExpr -> [CoreExpr]
(paMethod pa_pack ty)
combinePA :: Type -> CoreExpr -> CoreExpr -> CoreExpr -> [CoreExpr]
@@
-455,7
+455,7
@@
mkLiftEnv lc tys vs
env = Var (dataConWrapId env_con)
`mkTyApps` env_tyargs
env = Var (dataConWrapId env_con)
`mkTyApps` env_tyargs
- `mkVarApps` (lc : vs)
+ `mkApps` (Var lc : args)
bind env body = let scrut = unwrapFamInstScrut env_tc env_tyargs env
in
bind env body = let scrut = unwrapFamInstScrut env_tc env_tyargs env
in
@@
-466,6
+466,9
@@
mkLiftEnv lc tys vs
where
vty = mkCoreTupTy tys
where
vty = mkCoreTupTy tys
+ args | null vs = [Var unitDataConId]
+ | otherwise = map Var vs
+
bndrs | null vs = [mkWildId unitTy]
| otherwise = vs
bndrs | null vs = [mkWildId unitTy]
| otherwise = vs