Skip to content

fix: correct x86 32-bit AVX/AVX2 intrinsic imports - #16

Merged
shenjinti merged 1 commit into
restsend:mainfrom
SmileofHaven:main
Sep 6, 2026
Merged

fix: correct x86 32-bit AVX/AVX2 intrinsic imports#16
shenjinti merged 1 commit into
restsend:mainfrom
SmileofHaven:main

Conversation

@SmileofHaven

Copy link
Copy Markdown
Contributor

core::arch::x86_64 doesn't exist on 32-bit x86 targets.'
Several SIMD helper functions gated with
#[cfg(any(target_arch = "x86", target_arch = "x86_64"))] (so they
compile on both 32- and 64-bit x86) unconditionally did
use core::arch::x86_64::*; inside the function body, which fails to
compile on 32-bit x86 targets
this broke the Android x86 (32-bit)
build.

This switches those imports to pull from core::arch::x86 or
core::arch::x86_64 depending on the actual compile target.
core::arch::x86 and core::arch::x86_64 expose identical intrinsic
names for the SSE/AVX/AVX2/FMA ops used here, so no logic changes

Verified: CI build for Android x86 (32-bit) now succeeds in my fork

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.

2 participants