rust-lang / rust-lang/stdarch

Use `intrinsics::simd` for LoongArch LSX/LASX

Open
#1,982 3 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Rust
Stars
694
Forks
336
Avg merge
5d 14h
Merged PRs (30d)
9

Description

It would be great if the LoongArch LSX/LASX intrinsics were rewritten using intrinsics::simd. This would allow for using them in Miri and would help the Cranelift or GCC codegen backends by not relying on LLVM directly. Most Some of the x86, ARM, s390x and PowerPC intrinsics are already making use of this.

Some examples of this being done for aarch64 code: https://github.com/rust-lang/stdarch/pull/1872, https://github.com/rust-lang/stdarch/pull/1871

For people interested in this, there's a good unofficial documentation on equivalents in SSE and AVX2: https://jia.je/unofficial-loongarch-intrinsics-guide/

cc @heiher, @RalfJung

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Locate the existing LoongArch LSX/LASX intrinsic implementations and compare them with the aarch64 examples in stdarch PRs 1872 and 1871. Use the intrinsics::simd documentation and the unofficial SSE/AVX2 equivalents guide to map the operations. Done means the LoongArch intrinsics use intrinsics::simd rather than relying directly on LLVM, enabling the stated Miri and alternative codegen use cases.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
compilers
Issue type
Refactor
Difficulty
4/5
Estimated time
3-5 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
48/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.