Skip to content
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

With LLVM 20 the SIMD intrinsic wasm32::u8x16_sub_sat is compiled to a function call #137419

Open
hkratz opened this issue Feb 22, 2025 · 2 comments
Labels
A-LLVM Area: Code generation parts specific to LLVM. Both correctness bugs and optimization-related issues. A-SIMD Area: SIMD (Single Instruction Multiple Data) C-bug Category: This is a bug. needs-triage This issue may need triage. Remove it if it has been sufficiently triaged. O-wasm Target: WASM (WebAssembly), http://webassembly.org/

Comments

@hkratz
Copy link
Contributor

hkratz commented Feb 22, 2025

The WASM SIMD intrinsic std::arch::wasm32::u8x16_sub_sat used to be compiled to the WASM instruction i8x16.sub_sat_u. Since the switch LLVM 20 (bisected) it is compiled to call llvm.wasm.sub.sat.unsigned.v16i8

Other intrinsics (e.g. saturated integer addition) do not seem to be affected.

Godbolt

@hkratz hkratz added the C-bug Category: This is a bug. label Feb 22, 2025
@rustbot rustbot added the needs-triage This issue may need triage. Remove it if it has been sufficiently triaged. label Feb 22, 2025
@hkratz
Copy link
Contributor Author

hkratz commented Feb 22, 2025

@rustbot label +A-llvm +A-SIMD +O-WASM

@rustbot rustbot added A-LLVM Area: Code generation parts specific to LLVM. Both correctness bugs and optimization-related issues. O-wasm Target: WASM (WebAssembly), http://webassembly.org/ A-SIMD Area: SIMD (Single Instruction Multiple Data) labels Feb 22, 2025
@nikic
Copy link
Contributor

nikic commented Feb 22, 2025

This is already fixed in stdarch (rust-lang/stdarch#1719), but needs the update to be pulled in.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-LLVM Area: Code generation parts specific to LLVM. Both correctness bugs and optimization-related issues. A-SIMD Area: SIMD (Single Instruction Multiple Data) C-bug Category: This is a bug. needs-triage This issue may need triage. Remove it if it has been sufficiently triaged. O-wasm Target: WASM (WebAssembly), http://webassembly.org/
Projects
None yet
Development

No branches or pull requests

3 participants