[Git][ghc/ghc][wip/andreask/simd_test] Compile T25062 simd tests even if we can't run them.
Andreas Klebinger (@AndreasK)
gitlab at gitlab.haskell.org
Fri Nov 1 13:36:21 UTC 2024
Andreas Klebinger pushed to branch wip/andreask/simd_test at Glasgow Haskell Compiler / GHC
Commits:
4ebd2cc0 by Andreas Klebinger at 2024-11-01T14:16:06+01:00
Compile T25062 simd tests even if we can't run them.
Helps avoid them being utterly broken.
Fixes #25341
- - - - -
2 changed files:
- testsuite/tests/simd/should_run/T25062_V64.hs
- testsuite/tests/simd/should_run/all.T
Changes:
=====================================
testsuite/tests/simd/should_run/T25062_V64.hs
=====================================
@@ -10,7 +10,7 @@ main =
case foo ( \ x y -> plusDoubleX8# x y ) of
v -> case unpackDoubleX8# v of
(# d1, d2, d3, d4, d5, d6, d7, d8 #) ->
- print [ D# d1, D# d2, D# d3, D# d4, D# d5, D# d6, D# d7, D# d8s ]
+ print [ D# d1, D# d2, D# d3, D# d4, D# d5, D# d6, D# d7, D# d8 ]
{-# NOINLINE foo #-}
foo :: ( DoubleX8# -> DoubleX8# -> DoubleX8# ) -> DoubleX8#
=====================================
testsuite/tests/simd/should_run/all.T
=====================================
@@ -58,13 +58,26 @@ test('simd014',
test('T22187', [],compile,[''])
test('T22187_run', [],compile_and_run,[''])
test('T25062_V16', [], compile_and_run, [''])
-test('T25062_V32', [ unless(have_cpu_feature('avx2'), skip)
- , only_ways(llvm_ways) # SIMD NCG TODO: support 256 bit wide vectors
- ]
- , compile_and_run, [''])
-test('T25062_V64', [ unless(have_cpu_feature('avx512f'), skip)
- , only_ways(llvm_ways) # SIMD NCG TODO: support 512 bit wide vectors
- ]
- , compile_and_run, [''])
+
+# Even if the CPU we run on doesn't support *executing* those tests we should try to
+# compile them.
+# Currently even for compilation we only support 256+ bit on x86
+only_V32_plus_compilation_support = unless(arch('x86_64'), skip)
+
+test('T25062_V32'
+ , [ extra_hc_opts('-mavx2')
+ , only_ways(llvm_ways) # SIMD NCG TODO: support 256+ bit wide vectors
+ , only_V32_plus_compilation_support
+ ]
+ , compile_and_run if have_cpu_feature('avx2') else compile
+ , [''])
+
+test('T25062_V64'
+ , [ extra_hc_opts('-mavx512f')
+ , only_ways(llvm_ways) # SIMD NCG TODO: support 256+ bit wide vectors
+ , only_V32_plus_compilation_support
+ ]
+ , compile_and_run if have_cpu_feature('avx512f') else compile
+ , [''])
test('T25169', [], compile_and_run, [''])
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/4ebd2cc04c7c6ba6446800e4369c9f688650a2da
--
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/4ebd2cc04c7c6ba6446800e4369c9f688650a2da
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/20241101/a1b58bbc/attachment-0001.html>
More information about the ghc-commits
mailing list