Skip to content

[experiment] remove the portable simd f16 patch#1675

Draft
folkertdev wants to merge 1 commit into
rust-lang:mainfrom
folkertdev:remove-f16-simd-patch
Draft

[experiment] remove the portable simd f16 patch#1675
folkertdev wants to merge 1 commit into
rust-lang:mainfrom
folkertdev:remove-f16-simd-patch

Conversation

@folkertdev

Copy link
Copy Markdown
Contributor

I believe this will fail but let's see what happens.

@folkertdev

Copy link
Copy Markdown
Contributor Author

As expected

https://triage.rust-lang.org/gha-logs/rust-lang/rustc_codegen_cranelift/86638749132?pr=1675

  = note: C:/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/15.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: D:\a\rustc_codegen_cranelift\rustc_codegen_cranelift\build\portable-simd_target\x86_64-pc-windows-gnu\debug\deps\libproptest-f4ca5451e39982af.rlib(proptest-f4ca5451e39982af.proptest.26d0c0f6a929e698-cgu.05.rcgu.o):proptest.26d0c0f6a929e698-cgu.05.o:(.rdata$.refptr+0x0): undefined reference to `floorf16'
          C:/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/15.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: D:\a\rustc_codegen_cranelift\rustc_codegen_cranelift\build\portable-simd_target\x86_64-pc-windows-gnu\debug\deps\libproptest-f4ca5451e39982af.rlib(proptest-f4ca5451e39982af.proptest.26d0c0f6a929e698-cgu.05.rcgu.o):proptest.26d0c0f6a929e698-cgu.05.o:(.rdata$.refptr+0x0): undefined reference to `ceilf16'
          collect2.exe: error: ld returned 1 exit status

So that means we additionally need fallbacks for floorf16 and ceilf16. I'll look into that, seems straightforward.

jhpratt added a commit to jhpratt/rust that referenced this pull request Jul 18, 2026
…, r=tgross35

add a fallback for more `f16` intrinsics

tracking issue: rust-lang#116909

Add several more fallbacks for `f16` intrinsics, so that they will work on platforms without the corresponding libcalls.

related

- rust-lang/rustc_codegen_cranelift#1675
- rust-lang/rustc_codegen_cranelift#1674
- rust-lang#150946
@bjorn3
bjorn3 force-pushed the remove-f16-simd-patch branch from b085bcc to d5b0c74 Compare July 19, 2026 17:52
@folkertdev

Copy link
Copy Markdown
Contributor Author

This is still missing the return false, // has a fallback via f32s that #1674 adds for some of the other functions

@folkertdev
folkertdev force-pushed the remove-f16-simd-patch branch 2 times, most recently from 1f6cedf to 1da99dd Compare July 19, 2026 20:46
@folkertdev
folkertdev force-pushed the remove-f16-simd-patch branch from 1da99dd to ad67ef8 Compare July 19, 2026 20:52
@folkertdev

Copy link
Copy Markdown
Contributor Author

Hmm, the changes here are good, but I think we need the the additional gates I added. those are merged into portable_simd but not yet synced.

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.

1 participant