diff options
Diffstat (limited to 'compiler/vectorise/Vectorise/Convert.hs')
-rw-r--r-- | compiler/vectorise/Vectorise/Convert.hs | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/compiler/vectorise/Vectorise/Convert.hs b/compiler/vectorise/Vectorise/Convert.hs index f21f5cac86..bbd0c5a39b 100644 --- a/compiler/vectorise/Vectorise/Convert.hs +++ b/compiler/vectorise/Vectorise/Convert.hs @@ -11,9 +11,12 @@ import CoreSyn import TyCon import Type import TypeRep +import NameSet import FastString import Outputable +import Control.Applicative + -- |Convert a vectorised expression such that it computes the non-vectorised equivalent of its -- value. @@ -90,10 +93,11 @@ identityConv (ForAllTy {}) = noV $ text "identityConv: quantified type changes u identityConvTyCon :: TyCon -> VM () identityConvTyCon tc = do - { tc' <- lookupTyCon tc - ; case tc' of - Nothing -> return () - Just _ -> noV idErr + { isParallel <- (tyConName tc `elemNameSet`) <$> globalParallelTyCons + ; parray <- builtin parrayTyCon + ; if isParallel && not (tc == parray) + then noV idErr + else return () } where idErr = text "identityConvTyCon: type constructor contains parallel arrays" <+> ppr tc |