Skip to content

feat: add support for loongarch64 LASX SIMD intrinsics#6538

Open
yxd-ym wants to merge 1 commit intolance-format:mainfrom
yxd-ym:loong64-support
Open

feat: add support for loongarch64 LASX SIMD intrinsics#6538
yxd-ym wants to merge 1 commit intolance-format:mainfrom
yxd-ym:loong64-support

Conversation

@yxd-ym
Copy link
Copy Markdown

@yxd-ym yxd-ym commented Apr 16, 2026

This change adds proper support for loongarch64 using LASX SIMD instructions. The SIMD support is gated behind a new nightly feature since it requires the unstable stdarch_loongarch feature.

Fixes compilation errors on u8x16 by:

  1. Using v32i8 (256-bit) instead of v16i8 (128-bit) for the vector type
  2. Fixing incorrect function names (lasx_xvand → lasx_xvand_v, lasx_xvadds_bu → lasx_xvadd_b)
  3. Fixing argument types (cast u8 to i32 for lasx_xvreplgr2vr_b)
  4. Fixed shift constant type (N: u32 instead of i32)
  5. Added scalar fallback for missing lasx_xvpermi_b

Assisted-by: Claude:ark-code-latest

@github-actions github-actions Bot added the enhancement New feature or request label Apr 16, 2026
This change adds proper support for loongarch64 using LASX SIMD instructions.
The SIMD support is gated behind a new `nightly` feature since it requires
the unstable `stdarch_loongarch` feature.

Fixes compilation errors on `u8x16` by:
1. Using `v32i8` (256-bit) instead of `v16i8` (128-bit) for the vector type
2. Fixing incorrect function names (lasx_xvand → lasx_xvand_v, lasx_xvadds_bu → lasx_xvadd_b)
3. Fixing argument types (cast u8 to i32 for lasx_xvreplgr2vr_b)
4. Fixed shift constant type (N: u32 instead of i32)
5. Added scalar fallback for missing lasx_xvpermi_b

Assisted-by: Claude:ark-code-latest
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant