Commit ffe6bf7b authored by rl@cse.unsw.edu.au's avatar rl@cse.unsw.edu.au
Browse files

Fix bug in vectorisation

parent fb047134
...@@ -83,14 +83,12 @@ vectTopBind b@(Rec bs) ...@@ -83,14 +83,12 @@ vectTopBind b@(Rec bs)
vectTopBinder :: Var -> VM Var vectTopBinder :: Var -> VM Var
vectTopBinder var vectTopBinder var
= do = do
vty <- liftM (mkForAllTys tyvars) $ vectType mono_ty vty <- vectType (idType var)
name <- cloneName mkVectOcc (getName var) name <- cloneName mkVectOcc (getName var)
let var' | isExportedId var = Id.mkExportedLocalId name vty let var' | isExportedId var = Id.mkExportedLocalId name vty
| otherwise = Id.mkLocalId name vty | otherwise = Id.mkLocalId name vty
defGlobalVar var var' defGlobalVar var var'
return var' return var'
where
(tyvars, mono_ty) = splitForAllTys (idType var)
vectTopRhs :: CoreExpr -> VM CoreExpr vectTopRhs :: CoreExpr -> VM CoreExpr
vectTopRhs = liftM fst . closedV . vectPolyExpr (panic "Empty lifting context") . freeVars vectTopRhs = liftM fst . closedV . vectPolyExpr (panic "Empty lifting context") . freeVars
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment