Fix bugs in vectorisation of case expressions
[ghc-hetmet.git] / compiler / vectorise / Vectorise.hs
index 63575b9..fac66ec 100644 (file)
@@ -446,6 +446,7 @@ packLiftingContext len shape tag fvs res_ty p
                 $ varSetElems fvs
           (vexpr, lexpr) <- p
           return (vexpr, Let (NonRec sel_var sel_expr)
+                         . mkLets (concat bnds)
                          $ Case len lc_var res_ty [(DEFAULT, [], lexpr)])
 
 packFreeVar :: CoreExpr -> CoreExpr -> Var -> VM [CoreBind]