Vladislav Zavialov pushed to branch wip/int-index/out-of-scope at Glasgow Haskell Compiler / GHC Commits: 476c4cdf by Sean D. Gillespie at 2026-03-02T10:14:37-05:00 Add SIMD absolute value on x86 and LLVM On x86, absolute value of 32 bits or less is implemented with PABSB/PABSW/PABSD if SSSE3 is available. Otherwise, there is a fallback for SSE2. For 64 bit integers it uses VPABSQ, required by AVX-512VL, with fallbacks for SSE4.2 and SSE2. There is no dedicated instruction for floating point absolute value on x86, so it is simulated using bitwise AND. Absolute value for signed integers and floats are implemented by the "llvm.abs/llvm.fabs" standard library intrinsics. This implementation uses MachOps constructors, unlike non-vector floating point absolute value, which uses CallishMachOps. - - - - - 709448c0 by Sean D. Gillespie at 2026-03-02T10:14:46-05:00 Add SIMD floating point square root On x86, this is implemented with the SQRTPS and SQRTPD instructions. On LLVM, it uses the sqrt library intrinstic. - - - - - 0deadf66 by Sean D. Gillespie at 2026-03-02T10:14:47-05:00 Improve error message for SIMD on aarch64 When encountering vector literals on aarch64, previously it would throw: <no location info>: error: panic! (the 'impossible' happened) GHC version 9.15.20251219: getRegister' (CmmLit:CmmVec): Now it is more consistent with the other vector operations: <no location info>: error: sorry! (unimplemented feature or known bug) GHC version 9.15.20251219: SIMD operations on AArch64 currently require the LLVM backend - - - - - 7d64031b by Vladislav Zavialov at 2026-03-03T11:09:28-05:00 Replace maybeAddSpace with spaceIfSingleQuote Simplify pretty-printing of HsTypes by using spaceIfSingleQuote. This allows us to drop the unwieldy lhsTypeHasLeadingPromotionQuote helper function. Follow-up to 178c1fd830c78377ef5d338406a41e1d8eb5f0da - - - - - 6f7ac47b by Vladislav Zavialov at 2026-03-05T15:39:06+03:00 TyCons in terms with -fdefer-out-of-scope-variables (#19966) This fixes a regression introduced in 990ea991a1c35fdb894fcb91f919fb8f8fed33dd which prevented the following program from compiling: {-# OPTIONS -fdefer-out-of-scope-variables #-} f = Int In addition to that, we no longer abort type checking on TcRnIllegalTermLevelUse, allowing GHC to report more errors. - - - - - 55 changed files: - compiler/GHC/Builtin/primops.txt.pp - compiler/GHC/Cmm/MachOp.hs - compiler/GHC/CmmToAsm/AArch64/CodeGen.hs - compiler/GHC/CmmToAsm/X86/CodeGen.hs - compiler/GHC/CmmToAsm/X86/Instr.hs - compiler/GHC/CmmToAsm/X86/Ppr.hs - compiler/GHC/CmmToC.hs - compiler/GHC/CmmToLlvm/CodeGen.hs - compiler/GHC/Hs/Type.hs - compiler/GHC/Rename/Env.hs - compiler/GHC/StgToCmm/Prim.hs - compiler/GHC/StgToJS/Prim.hs - compiler/GHC/Tc/Errors.hs - compiler/GHC/Tc/Errors/Ppr.hs - compiler/GHC/Tc/Errors/Types.hs - compiler/GHC/Tc/Gen/Head.hs - compiler/GHC/Tc/Utils/Env.hs - compiler/GHC/Tc/Utils/TcMType.hs - libraries/base/src/GHC/Base.hs - libraries/base/src/GHC/Exts.hs - libraries/ghc-experimental/CHANGELOG.md - testsuite/tests/interface-stability/ghc-experimental-exports.stdout - testsuite/tests/interface-stability/ghc-experimental-exports.stdout-mingw32 - testsuite/tests/interface-stability/ghc-prim-exports.stdout - testsuite/tests/interface-stability/ghc-prim-exports.stdout-mingw32 - testsuite/tests/rename/should_compile/T19966.hs - + testsuite/tests/rename/should_compile/T19966.stderr - + testsuite/tests/rename/should_compile/T19966_main.hs - + testsuite/tests/rename/should_compile/T19966_main.stdout - testsuite/tests/rename/should_compile/all.T - testsuite/tests/rename/should_fail/RnStaticPointersFail02.stderr - testsuite/tests/simd/should_run/doublex2_arith.hs - testsuite/tests/simd/should_run/doublex2_arith.stdout - testsuite/tests/simd/should_run/doublex2_arith_baseline.hs - testsuite/tests/simd/should_run/doublex2_arith_baseline.stdout - testsuite/tests/simd/should_run/floatx4_arith.hs - testsuite/tests/simd/should_run/floatx4_arith.stdout - testsuite/tests/simd/should_run/floatx4_arith_baseline.hs - testsuite/tests/simd/should_run/floatx4_arith_baseline.stdout - testsuite/tests/simd/should_run/int16x8_arith.hs - testsuite/tests/simd/should_run/int16x8_arith.stdout - testsuite/tests/simd/should_run/int16x8_arith_baseline.hs - testsuite/tests/simd/should_run/int16x8_arith_baseline.stdout - testsuite/tests/simd/should_run/int32x4_arith.hs - testsuite/tests/simd/should_run/int32x4_arith.stdout - testsuite/tests/simd/should_run/int32x4_arith_baseline.hs - testsuite/tests/simd/should_run/int32x4_arith_baseline.stdout - testsuite/tests/simd/should_run/int64x2_arith.hs - testsuite/tests/simd/should_run/int64x2_arith.stdout - testsuite/tests/simd/should_run/int64x2_arith_baseline.hs - testsuite/tests/simd/should_run/int64x2_arith_baseline.stdout - testsuite/tests/simd/should_run/int8x16_arith.hs - testsuite/tests/simd/should_run/int8x16_arith.stdout - testsuite/tests/simd/should_run/int8x16_arith_baseline.hs - testsuite/tests/simd/should_run/int8x16_arith_baseline.stdout The diff was not included because it is too large. View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/5f6bef914e323c9e42efff914d6050a... -- View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/5f6bef914e323c9e42efff914d6050a... You're receiving this email because of your account on gitlab.haskell.org.
participants (1)
-
Vladislav Zavialov (@int-index)