Skip to content

Is LLVM's Intrinsic llvm.sin.f64 unsupported? #4338

Closed
@Maher4Ever

Description

@Maher4Ever

Hello Emscripten devs!

I'm trying to compile an LLVM IR file to JS using emscripten. Some functions in that file use the Sin function and it's declared as follows:

declare double @llvm.sin.f64(double) #2

; Other code ...

attributes #2 = { nounwind readnone }

When I compile my LLVM IR file, emcc complains about a missing sin function:

warning: unresolved symbol: llvm_sin_f64

I noticed that the dots are replaced with underscores in the function name, but my files doesn't contain any references to that function; only to the standard LLVM one with dots.

Since emcc can't find this function it has an incomplete implementation in the generated JS:

function _llvm_sin_f64() {
  Module['printErr']('missing function: llvm_sin_f64'); abort(-1);
}

I'm running the 64 bit version of emscripten from the incoming branch.

Is the @llvm.sin.f64 intrinsic unsupported? Or is this a bug?

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions