summaryrefslogtreecommitdiff
path: root/compiler/cmm/CmmLint.hs
diff options
context:
space:
mode:
authorAbhiroop Sarkar <asiamgenius@gmail.com>2018-09-27 15:28:46 -0400
committerMarge Bot <ben+marge-bot@smart-cactus.org>2019-07-03 09:33:39 -0400
commitacd795583625401c5554f8e04ec7efca18814011 (patch)
tree545e529eed21e78592ff326d4ebf9804095ad2cb /compiler/cmm/CmmLint.hs
parentdf3e5b744db29c085f5bc05f8b609197bcbf9b0c (diff)
downloadhaskell-acd795583625401c5554f8e04ec7efca18814011.tar.gz
Add support for SIMD operations in the NCG
This adds support for constructing vector types from Float#, Double# etc and performing arithmetic operations on them Cleaned-Up-By: Ben Gamari <ben@well-typed.com>
Diffstat (limited to 'compiler/cmm/CmmLint.hs')
-rw-r--r--compiler/cmm/CmmLint.hs10
1 files changed, 7 insertions, 3 deletions
diff --git a/compiler/cmm/CmmLint.hs b/compiler/cmm/CmmLint.hs
index d5c3f84443..53dcd70b7b 100644
--- a/compiler/cmm/CmmLint.hs
+++ b/compiler/cmm/CmmLint.hs
@@ -148,9 +148,13 @@ lintCmmMiddle node = case node of
dflags <- getDynFlags
erep <- lintCmmExpr expr
let reg_ty = cmmRegType dflags reg
- if (erep `cmmEqType_ignoring_ptrhood` reg_ty)
- then return ()
- else cmmLintAssignErr (CmmAssign reg expr) erep reg_ty
+ case isVecCatType reg_ty of
+ True -> if ((typeWidth reg_ty) == (typeWidth erep))
+ then return ()
+ else cmmLintAssignErr (CmmAssign reg expr) erep reg_ty
+ _ -> if (erep `cmmEqType_ignoring_ptrhood` reg_ty)
+ then return ()
+ else cmmLintAssignErr (CmmAssign reg expr) erep reg_ty
CmmStore l r -> do
_ <- lintCmmExpr l