Skip to content

loongarch: Use unified data types for SIMD intrinsics #1879

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jul 25, 2025

Conversation

heiher
Copy link
Contributor

@heiher heiher commented Jul 19, 2025

Suggested by @sayantn

@rustbot
Copy link
Collaborator

rustbot commented Jul 19, 2025

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

@heiher
Copy link
Contributor Author

heiher commented Jul 19, 2025

Although type aliases won't break the build, they will trigger clippy wanrings. If the user's CI treats warnings as errors, this could cause the CI to fail.

warning: transmute from a type (`std::arch::loongarch64::m256i`) to itself
   --> src/simd/lines_bwd.rs:204:47
    |
204 |                 let tmp = lasx_xvpermi_q::<1>(T(sum), T(sum));
    |                                               ^^^^^^
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_transmute
    = note: `#[warn(clippy::useless_transmute)]` on by default

@sayantn
Copy link
Contributor

sayantn commented Jul 19, 2025

seeing that it is a clippy warning, not even rustc-builtin, I would say this is acceptable

Copy link
Contributor

@folkertdev folkertdev left a comment

Choose a reason for hiding this comment

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

re. the transmute warning, that is fine, but it's probably nicest for users to #[allow] the lint (or even #[expect] if you can make that work)

@heiher heiher force-pushed the loong-simd-unified-types branch from 241e547 to 24ee4b0 Compare July 21, 2025 10:29
@heiher
Copy link
Contributor Author

heiher commented Jul 24, 2025

a gentle ping.

Copy link
Contributor

@folkertdev folkertdev left a comment

Choose a reason for hiding this comment

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

The technical changes look good to me, I've left some notes on the docs. Those are user-facing, so I've been a bit nit-picky there.

@heiher heiher force-pushed the loong-simd-unified-types branch 2 times, most recently from 7ad929b to aef5960 Compare July 24, 2025 14:54
@heiher heiher force-pushed the loong-simd-unified-types branch from aef5960 to 4828d5c Compare July 25, 2025 01:30
@folkertdev
Copy link
Contributor

r? @folkertdev

@folkertdev folkertdev added this pull request to the merge queue Jul 25, 2025
Merged via the queue into rust-lang:master with commit af40774 Jul 25, 2025
62 checks passed
@heiher heiher deleted the loong-simd-unified-types branch July 25, 2025 14:07
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