FIX #1910: fix code generated for GDTOI on x86_32
[ghc-hetmet.git] / compiler / vectorise / VectType.hs
index 9bf11e6..e69bfd9 100644 (file)
@@ -431,7 +431,7 @@ arrReprVars repr
 mkRepr :: TyCon -> VM Repr
 mkRepr vect_tc
   | [tys] <- rep_tys = boxedProductRepr tys
-  | all null rep_tys = enumRepr
+  -- | all null rep_tys = enumRepr
   | otherwise        = sumRepr =<< mapM unboxedProductRepr rep_tys
   where
     rep_tys = map dataConRepArgTys $ tyConDataCons vect_tc
@@ -1022,7 +1022,7 @@ fromVect (FunTy arg_ty res_ty) expr
       vres_ty <- vectType res_ty
       apply   <- builtin applyClosureVar
       body    <- fromVect res_ty
-               $ Var apply `mkTyApps` [arg_ty, res_ty] `mkApps` [expr, Var arg]
+               $ Var apply `mkTyApps` [varg_ty, vres_ty] `mkApps` [expr, varg]
       return $ Lam arg body
 fromVect ty expr
   = identityConv ty >> return expr