summaryrefslogtreecommitdiff
path: root/compiler/vectorise
diff options
context:
space:
mode:
authorRoman Leshchinskiy <rl@cse.unsw.edu.au>2007-12-05 22:13:05 +0000
committerRoman Leshchinskiy <rl@cse.unsw.edu.au>2007-12-05 22:13:05 +0000
commit942e48588ffe6240a9e1b8eb70a69c16d11db124 (patch)
tree104313daba31a5206d780eb81fcceac073d5f4d7 /compiler/vectorise
parent3dca032ca627396fcfa9e6bd03ea81ff6b9e999b (diff)
downloadhaskell-942e48588ffe6240a9e1b8eb70a69c16d11db124.tar.gz
Vectorise case of unit correctly
Diffstat (limited to 'compiler/vectorise')
-rw-r--r--compiler/vectorise/Vectorise.hs8
1 files changed, 8 insertions, 0 deletions
diff --git a/compiler/vectorise/Vectorise.hs b/compiler/vectorise/Vectorise.hs
index d85ef6ab4f..1b7bca0153 100644
--- a/compiler/vectorise/Vectorise.hs
+++ b/compiler/vectorise/Vectorise.hs
@@ -337,6 +337,14 @@ vectAlgCase tycon ty_args scrut bndr ty [(DEFAULT, [], body)]
(vbndr, vbody) <- vectBndrIn bndr (vectExpr body)
return $ vCaseDEFAULT vscrut vbndr vty lty vbody
+vectAlgCase tycon ty_args scrut bndr ty [(DataAlt dc, [], body)]
+ = do
+ vscrut <- vectExpr scrut
+ vty <- vectType ty
+ lty <- mkPArrayType vty
+ (vbndr, vbody) <- vectBndrIn bndr (vectExpr body)
+ return $ vCaseDEFAULT vscrut vbndr vty lty vbody
+
vectAlgCase tycon ty_args scrut bndr ty [(DataAlt dc, bndrs, body)]
= do
vect_tc <- maybeV (lookupTyCon tycon)