[Git][ghc/ghc][master] testsuite: fix T3586 for non-SSE3 platforms
Marge Bot pushed to branch master at Glasgow Haskell Compiler / GHC Commits: 70ee825a by Cheng Shao at 2025-10-14T21:52:50-04:00 testsuite: fix T3586 for non-SSE3 platforms `T3586.hs` contains `-fvia-C -optc-msse3` which I think is a best-effort basis to harvest the C compiler's auto vectorization optimizations via the C backend back when the test was added. The `-fvia-C` part is now a deprecated no-op because GHC can't fall back to the C backend on a non-unregisterised build, and `-optc-msse3` might actually cause the test to fail on non x86/x64 platforms, e.g. recent builds of wasi-sdk would report `wasm32-wasi-clang: error: unsupported option '-msse3' for target 'wasm32-unknown-wasi'`. So this patch cleans up this historical cruft. `-fvia-C` is removed, and `-optc-msse3` is only passed when cpuid contains `pni` (which indicates support of SSE3). - - - - - 3 changed files: - testsuite/driver/cpu_features.py - testsuite/tests/perf/should_run/T3586.hs - testsuite/tests/perf/should_run/all.T Changes: ===================================== testsuite/driver/cpu_features.py ===================================== @@ -8,7 +8,7 @@ SUPPORTED_CPU_FEATURES = { # These aren't comprehensive; they are only CPU features that we care about # x86: - 'sse', 'sse2', 'sse3', 'ssse3', 'sse4_1', 'sse4_2', + 'sse', 'sse2', 'sse3', 'pni', 'ssse3', 'sse4_1', 'sse4_2', 'avx', 'avx2', 'avx512f', 'fma', 'popcnt', 'bmi1', 'bmi2' ===================================== testsuite/tests/perf/should_run/T3586.hs ===================================== @@ -1,5 +1,5 @@ {-# LANGUAGE BangPatterns #-} -{-# OPTIONS -fvia-C -optc-O3 -fexcess-precision -optc-msse3 #-} +{-# OPTIONS -optc-O3 -fexcess-precision #-} import Control.Monad.ST import Data.Array.ST ===================================== testsuite/tests/perf/should_run/all.T ===================================== @@ -43,6 +43,7 @@ test('T3586', [collect_runtime_residency(2), collect_stats('bytes allocated', 5), only_ways(['normal']), + when(have_cpu_feature('pni') or have_cpu_feature('sse3'), extra_hc_opts('-optc-msse3')), ], compile_and_run, ['-O']) View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/70ee825a516bcf7aac762bfedb4a017d... -- View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/70ee825a516bcf7aac762bfedb4a017d... You're receiving this email because of your account on gitlab.haskell.org.
participants (1)
-
Marge Bot (@marge-bot)