Skip to content

f128 on wasm does not support maximum intrinsic #158673

Description

@ChrisDenton

The maximum intrinsic seems to be missing for wasm. See #150075 (comment)

unexpected runtime library name: fmaximum_numl
UNREACHABLE executed at /checkout/src/llvm-project/llvm/lib/Target/WebAssembly/WebAssemblyRuntimeLibcallSignatures.cpp:952!

Activity

  1. added
    T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.
    F-f16_and_f128`#![feature(f16)]`, `#![feature(f128)]`
    on Jul 1, 2026
  2. added
    needs-triageThis issue may need triage. Remove when done. See docs forge.rust-lang.org/release/issue-triaging
    on Jul 1, 2026
  3. tgross35 commented on Jul 1, 2026

    @tgross35
    Member

    Easy repro with --target wasm32-unknown-unknown https://rust.godbolt.org/z/Mxnhnxqoq:

    #![feature(f128)]
    
    #[unsafe(no_mangle)]
    pub fn f128_max(a: f128, b: f128) -> f128 {
        a.max(b)
    }

    We actually don't need a quick fix on the Rust side for that PR, just a gate update. This would build but not run correctly on almost all platforms anyway because of llvm/llvm-project#44744.

  4. added
    A-LLVMArea: Code generation parts specific to LLVM. Both correctness bugs and optimization-related issues.
    WG-llvmWorking group: LLVM backend code generation
    and removed
    needs-triageThis issue may need triage. Remove when done. See docs forge.rust-lang.org/release/issue-triaging
    on Jul 1, 2026
  5. tgross35 commented on Jul 1, 2026

    @tgross35
    Member
  6. added
    llvm-fixed-upstreamIssue expected to be fixed by the next major LLVM upgrade, or backported fixes
    on Jul 8, 2026
  7. folkertdev commented on Aug 5, 2026

    @folkertdev
    Contributor

    LLVM 23 does support these intrinsics for f128, is there anything left to do here?

  8. tgross35 commented on Aug 5, 2026

    @tgross35
    Member

    Let's just wait until the godbolt link works (picks up the nightly releasing soon with LLVM23) then I think it's fine to close

  9. tgross35 commented on Aug 6, 2026

    @tgross35
    Member

    The above link is now indeed fixed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-LLVMArea: Code generation parts specific to LLVM. Both correctness bugs and optimization-related issues.F-f16_and_f128`#![feature(f16)]`, `#![feature(f128)]`T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.WG-llvmWorking group: LLVM backend code generationllvm-fixed-upstreamIssue expected to be fixed by the next major LLVM upgrade, or backported fixes

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions