[Git][ghc/ghc][wip/mp-9.2.5-backports] 3 commits: Cmm Lint: relax SIMD register assignment check
Zubin (@wz1000)
gitlab at gitlab.haskell.org
Wed Oct 26 13:22:39 UTC 2022
Zubin pushed to branch wip/mp-9.2.5-backports at Glasgow Haskell Compiler / GHC
Commits:
db4c15a6 by sheaf at 2022-10-26T18:52:08+05:30
Cmm Lint: relax SIMD register assignment check
As noted in #22297, SIMD vector registers can be used
to store different kinds of values, e.g. xmm1 can be used
both to store integer and floating point values.
The Cmm type system doesn't properly account for this, so
we weaken the Cmm register assignment lint check to only
compare widths when comparing a vector type with its
allocated vector register.
(cherry picked from commit 3be48877e204fca8e5d5ab984186e0d20d81f262)
- - - - -
3e8b83ed by sheaf at 2022-10-26T18:52:28+05:30
Disable some SIMD tests on non-X86 architectures
(cherry picked from commit f7b7a3122185222d5059e37315991afcf319e43c)
- - - - -
c29100e6 by Zubin Duggal at 2022-10-26T18:52:30+05:30
Bump process to 1.6.16.0
- - - - -
3 changed files:
- compiler/GHC/Cmm/Lint.hs
- libraries/process
- testsuite/tests/unboxedsums/all.T
Changes:
=====================================
compiler/GHC/Cmm/Lint.hs
=====================================
@@ -170,9 +170,21 @@ lintCmmMiddle node = case node of
platform <- getPlatform
erep <- lintCmmExpr expr
let reg_ty = cmmRegType platform reg
- if (erep `cmmEqType_ignoring_ptrhood` reg_ty)
- then return ()
- else cmmLintAssignErr (CmmAssign reg expr) erep reg_ty
+ unless (compat_regs erep reg_ty) $
+ cmmLintAssignErr (CmmAssign reg expr) erep reg_ty
+ where
+ compat_regs :: CmmType -> CmmType -> Bool
+ compat_regs ty1 ty2
+ -- As noted in #22297, SIMD vector registers can be used for
+ -- multiple different purposes, e.g. xmm1 can be used to hold 4 Floats,
+ -- or 4 Int32s, or 2 Word64s, ...
+ -- To allow this, we relax the check: we only ensure that the widths
+ -- match, until we can find a more robust solution.
+ | isVecType ty1
+ , isVecType ty2
+ = typeWidth ty1 == typeWidth ty2
+ | otherwise
+ = cmmEqType_ignoring_ptrhood ty1 ty2
CmmStore l r _alignment -> do
_ <- lintCmmExpr l
=====================================
libraries/process
=====================================
@@ -1 +1 @@
-Subproject commit b39bbc0625c99c8c02840d8fd3ae45f062c9c78a
+Subproject commit 2e7e0d6fed946c333eb679a8381e3a6383704a4f
=====================================
testsuite/tests/unboxedsums/all.T
=====================================
@@ -27,5 +27,8 @@ test('T12711', only_ways(['ghci']), ghci_script, ['T12711.script'])
test('UbxSumLevPoly', normal, compile, ['-Wno-overlapping-patterns'])
test('T14051', normal, multi_compile, ['T14051.hs', [('T14051a.hs', '')], '-O2 -v0'])
test('T19645', normal, compile_and_run, [''])
-test('T22187',[only_ways(llvm_ways), expect_broken(22296)],compile,[''])
-test('T22187_run',[only_ways(llvm_ways), expect_broken(22296)],compile_and_run,[''])
+
+test('T22187',[only_ways(llvm_ways)],compile,[''])
+test('T22187_run',[only_ways(llvm_ways)
+ ,unless(arch('x86_64'), skip)],compile_and_run,[''])
+
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/be3dce2ce62fead1b72df686e67647fe4745de73...c29100e6442b7ddd3275d7f0e806860472d24cca
--
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/be3dce2ce62fead1b72df686e67647fe4745de73...c29100e6442b7ddd3275d7f0e806860472d24cca
You're receiving this email because of your account on gitlab.haskell.org.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.haskell.org/pipermail/ghc-commits/attachments/20221026/1f2410ff/attachment-0001.html>
More information about the ghc-commits
mailing list