Commit cc67e20f authored by's avatar
Browse files

Fix vectoriser bug

We were using mkWildId in situations where it cause disastrous shadowing
parent c1572a89
......@@ -336,7 +336,7 @@ newLocalVar fs ty
return $ mkSysLocal fs u ty
newDummyVar :: Type -> VM Var
newDummyVar = newLocalVar (fsLit "ds")
newDummyVar = newLocalVar (fsLit "vv")
newTyVar :: FastString -> Kind -> VM Var
newTyVar fs k
......@@ -370,11 +370,13 @@ vectAlgCase tycon _ty_args scrut bndr ty alts
let (vect_scrut, lift_scrut) = vscrut
(vect_bodies, lift_bodies) = unzip vbodies
let vect_case = Case vect_scrut (mkWildId (exprType vect_scrut)) vty
vdummy <- newDummyVar (exprType vect_scrut)
ldummy <- newDummyVar (exprType lift_scrut)
let vect_case = Case vect_scrut vdummy vty
(zipWith3 mk_vect_alt vect_dcs vect_bndrss vect_bodies)
lbody <- combinePA vty len sel indices lift_bodies
let lift_case = Case lift_scrut (mkWildId (exprType lift_scrut)) lty
let lift_case = Case lift_scrut ldummy lty
[(DataAlt arr_dc, shape_bndrs ++ concat lift_bndrss,
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