Fix bug in vectorisation of case expressions
authorRoman Leshchinskiy <rl@cse.unsw.edu.au>
Fri, 11 Apr 2008 04:53:07 +0000 (04:53 +0000)
committerRoman Leshchinskiy <rl@cse.unsw.edu.au>
Fri, 11 Apr 2008 04:53:07 +0000 (04:53 +0000)
compiler/vectorise/Vectorise.hs

index 48aa05c..562e46d 100644 (file)
@@ -471,9 +471,8 @@ packLiftingContext len shape tag fvs vty lty p
           (vexpr, lexpr) <- p
           empty <- emptyPA vty
           return (vexpr, Let (NonRec sel_var sel_expr)
-                         . mkLets (concat bnds)
                          $ Case len lc_var lty
-                             [(DEFAULT, [], lexpr),
+                             [(DEFAULT, [], mkLets (concat bnds) lexpr),
                               (LitAlt (mkMachInt 0), [], empty)])
 
 packFreeVar :: CoreExpr -> CoreExpr -> Var -> VM [CoreBind]