Skip to content

loongarch: Use intrinsics::simd for selected LSX/LASX intrinsics#2078

Merged
sayantn merged 2 commits intorust-lang:mainfrom
heiher:loong-generic-intrinsics
Apr 23, 2026
Merged

loongarch: Use intrinsics::simd for selected LSX/LASX intrinsics#2078
sayantn merged 2 commits intorust-lang:mainfrom
heiher:loong-generic-intrinsics

Conversation

@heiher
Copy link
Copy Markdown
Contributor

@heiher heiher commented Apr 11, 2026

This change migrates a subset of LSX/LASX intrinsics to the portable intrinsics::simd interface.

Only straightforward mappings are converted in this patch. Intrinsics that require more complex transformations or currently result in suboptimal code generation are intentionally left unchanged and will be migrated incrementally in follow-up patches.

@rustbot
Copy link
Copy Markdown
Collaborator

rustbot commented Apr 11, 2026

r? @sayantn

rustbot has assigned @sayantn.
They will have a look at your PR within the next two weeks and either review your PR or reassign to another reviewer.

Use r? to explicitly pick a reviewer

Why was this reviewer chosen?

The reviewer was selected based on:

  • Owners of files modified in this PR: @Amanieu, @folkertdev, @sayantn
  • @Amanieu, @folkertdev, @sayantn expanded to Amanieu, folkertdev, sayantn
  • Random selection from Amanieu, folkertdev, sayantn

Comment thread crates/stdarch-gen-loongarch/src/main.rs Outdated
@heiher heiher force-pushed the loong-generic-intrinsics branch from 3715c69 to 4dd9159 Compare April 15, 2026 13:09
@rustbot
Copy link
Copy Markdown
Collaborator

rustbot commented Apr 15, 2026

This PR was rebased onto a different main commit. Here's a range-diff highlighting what actually changed.

Rebasing is a normal part of keeping PRs up to date, so no action is needed—this note is just to help reviewers.

@heiher heiher force-pushed the loong-generic-intrinsics branch 3 times, most recently from 4397238 to 5a234fa Compare April 21, 2026 13:29
@heiher
Copy link
Copy Markdown
Contributor Author

heiher commented Apr 21, 2026

The recent changes are just minor impl tweaks.

For the intrinsics newly marked as portable, Is it better to include them in this patch, or put them in a separate PR?

Copy link
Copy Markdown
Contributor

@sayantn sayantn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Some small changes required for soundness, otherwise LGTM.
Also sorry for the late review

View changes since this review

Comment thread crates/core_arch/src/loongarch64/lasx/portable.rs
Comment thread crates/core_arch/src/loongarch64/lasx/portable.rs
Comment thread crates/core_arch/src/loongarch64/lasx/portable.rs Outdated
Comment thread crates/core_arch/src/loongarch64/lsx/portable.rs
Comment thread crates/core_arch/src/loongarch64/lsx/portable.rs
Comment thread crates/core_arch/src/loongarch64/simd.rs
This change migrates a subset of LSX/LASX intrinsics to the portable
`intrinsics::simd` interface.

Only straightforward mappings are converted in this patch. Intrinsics
that require more complex transformations or currently result in
suboptimal code generation are intentionally left unchanged and will be
migrated incrementally in follow-up patches.
@heiher heiher force-pushed the loong-generic-intrinsics branch from 5a234fa to b0dcc00 Compare April 22, 2026 08:08
@heiher heiher requested a review from sayantn April 23, 2026 13:56
@sayantn sayantn added this pull request to the merge queue Apr 23, 2026
Merged via the queue into rust-lang:main with commit ebbd667 Apr 23, 2026
76 checks passed
@heiher heiher deleted the loong-generic-intrinsics branch April 24, 2026 06:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants